|
Hmmm, something doesn't sound right.
Static variables are scoped to each class. For example, a Foo class may have a static variable called bar. This should be known, symbolically, as Foo.bar.
In your description, you seem to be creating some kind of semantic relationship between function names and static variables, which does not sound right to me.
In other words, I see two "gotchas" that are causing your problem. First, by taking all .jack files, combining them into one "text file" for parsing, you're losing the ability to use the filename to allude to the scope of any static variable. Second, if you haven't recognized that static in Jack means "scoped to the class," then you're probably not creating the right symbol name for that static var in your symbol table.
|