Example 7/13: add actions and infrastructure to compile nested functions.
Classes
Members
-
funct
-
Replace: manage stack of functions
-
functs
-
List of inner to outer nested frames,
nullat end.
Methods
-
_alloc()
-
Returns new
Varat next local/global address. -
_find()
-
Replace: searches blocks, functions, and global.
-
block()
-
block: begin body 'end';[inherit]. -
else()
-
else: Else body;[inherit] -
head()
-
head: 'function' Name;returns function symbol. -
loop()
-
loop: While cmp Do body 'od';[inherit]