Text to equation parser

Takes in an equation as a string of text and converts it to an array of nodes (for later calculation). Continuing in apply the techniques of the Nothing from Something talk. Attempting to make this without using conditional structures.

by Marcus Baptiste

HTML

<p>Enter Text</p>
<input type='text' id='input-text' />
<button id='btn-parse'>Parse Text</button>

JavaScript

var btnParse = document.getElementById('btn-parse');
var inputText = document.getElementById('input-text');

parseOpc = {
    "+": function() {
    
    },
    "-": function() {
    },
    "*": function() {
    },
    "/": function() {
    },
    "(": function() {
    },
    ")": function() {
    },
    " ": function() {
    }
};

function parseText(text) {
    var nodes = [];
    var len = text.length;
    var i;
        
    for (i=0; i<len; i++) {
        
    }
}