diff parser.js @ 19:132c7756860e

Use populateSymbols to generate symbol tables during compilation rather than populating them as we go. This change allows us to refer to symbols defined later in the input stream and also gives the symbol table logic a single home that can be used both by the compiler and editor.
author Mike Pavone <pavone@retrodev.com>
date Sun, 25 Mar 2012 16:11:19 -0700
parents 04ae32e91598
children 40a85f135be5
line wrap: on
line diff
--- a/parser.js	Sun Mar 25 15:57:26 2012 -0700
+++ b/parser.js	Sun Mar 25 16:11:19 2012 -0700
@@ -6,9 +6,10 @@
 	this.right = right;
 }
 
-function symbol(name)
+function symbol(name, symbols)
 {
 	this.name = name;
+	this.symbols = symbols;
 }
 symbol.prototype.cleanName = function() {
 	return this.name[0] == ':' ? this.name.substr(1) : this.name;