pico-engine icon indicating copy to clipboard operation
pico-engine copied to clipboard

Checking for a name being defined is good but appears to use a single pass

Open b1conrad opened this issue 3 years ago • 0 comments

Phi wrote, "Seems like the definedness checker that is part of the parser is single pass, so names must be declared before they are used (textually, not temporally). That’s probably OK for now, although we’re going to run into cycle problems at some point (mutually recursive functions, for example). The ways to solve that are two pass parser (do definedness checks after the entire file has been parsed) or with declarations. I think I prefer two passes--simpler for the developer."

b1conrad avatar Jan 16 '21 22:01 b1conrad