Exemple #1
0
 public override void OnAnalyzerVisit(SemanticAnalyzer analyzer, int block)
 {
     symbol = new FunctionSymbol(block, Identifier.IdentifierName, ReturnType, ArgumentList);
     analyzer.AddSymbol(symbol);
     foreach (FormalArgument arg in ArgumentList)
     {
         VariableSymbol symbol = new VariableSymbol(Block.BlockId, arg.VariableType, arg.Identifier.IdentifierName);
         arg.Identifier.symbol = symbol;
         analyzer.AddSymbol(symbol);
     }
     Block.OnAnalyzerVisit(analyzer, block);
 }
Exemple #2
0
 public override void OnAnalyzerVisit(SemanticAnalyzer analyzer, int block)
 {
     symbol = new VariableSymbol(block, DeclareType, Identifier.IdentifierName);
     analyzer.AddSymbol(symbol);
     Identifier.OnAnalyzerVisit(analyzer, block);
 }