我正在尝试在方案中生成符号表,但我被困在 set-symbol 函数上。该数字对应于代码的块级别或“范围”。
First symbol it reads in
((c class 0))
Next symbols
(((c class 0) (a int 0) (b float 0)))
We read a bracket and read the next variables to a new scope.
(((a char 1) (d int 1)) ((c class 0) (a int 0) (b float 0)))
We leave that scope and "pop the stack".
(((c class 0) (a int 0) (b float 0)))
如何始终添加到范围内第一个列表的最深列表?