示例#1
0
 public override void OnAnalyzerVisit(SemanticAnalyzer analyzer, int block)
 {
     foreach (Expression arg in Arguments)
     {
         arg.OnAnalyzerVisit(analyzer, block);
     }
     Symbol = analyzer.FindFunction(Identifier.IdentifierName, Arguments);
     if (Symbol == null)
     {
         throw new SemanticError($"No corresponding function defined as {this.Identifier.IdentifierName}");
     }
     Return = Symbol.ReturnType;
 }
示例#2
0
 public override ReturnType CalcReturnType(SemanticAnalyzer analyzer)
 {
     return(analyzer.FindFunction(Identifier.IdentifierName, Arguments).ReturnType);
 }