Exemplo n.º 1
0
 // This is VISITED only within Expression as an variable
 // In FunctionDecl and VariableDecl it is added to SymbolTable
 public override void OnAnalyzerVisit(SemanticAnalyzer analyzer, int block)
 {
     BlockId = block;
     if (true)
     {
         symbol = analyzer.FindVariable(BlockId, IdentifierName);
         Return = (ReturnType)((VariableSymbol)symbol).VariableType;
     }
 }
Exemplo n.º 2
0
 public override ReturnType CalcReturnType(SemanticAnalyzer analyzer)
 {
     return(Return == ReturnType.Void ? (ReturnType)analyzer.FindVariable(BlockId, IdentifierName).VariableType : Return);
 }