示例#1
0
        public override void Accept(FunctionDeclaration funcDecl)
        {
            symbolTable.AddSymbol(funcDecl.Name);

            symbolTable.EnterScope();

            AddFunctionParameters(funcDecl.Parameters);

            funcDecl.VisitChildren(this);

            symbolTable.ExitScope();
        }
        public override void Accept(FunctionDeclaration decl)
        {
            symbolTable.AddSymbol(decl.Name);

            symbolTable.EnterScope();

            foreach (NamedParameter param in decl.Parameters)
            {
                symbolTable.AddSymbol(param.Name);
            }

            decl.VisitChildren(this);

            symbolTable.ExitScope();
        }