Clean up compiler a bit: move resolution of variables and operator indices into parser and make code generator only take numeric values.