示例#1
0
        // Block
        public override string Visit(BlockNode node, object obj)
        {
            StringBuilder builder = new StringBuilder();

            SymbolTable.OpenScope();

            builder.Append("{\n");
            node.Statements.ForEach(stmt => builder.Append(Visit(stmt))); // Append all statements
            builder.Append("}\n");

            SymbolTable.CloseScope();

            return(builder.ToString());
        }
示例#2
0
 public abstract T Visit(BlockNode node, object obj);