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; }
public override ReturnType CalcReturnType(SemanticAnalyzer analyzer) { return(analyzer.FindFunction(Identifier.IdentifierName, Arguments).ReturnType); }