protected override bool Visit(ASTCompilerCall node) { if (!Visit(node.Arguments)) { return(false); } var success = CheckMany( node.Position, node.Arguments, node.Procedure.Type.Arguments, (actual, expected) => CanImplecitCast(actual.TypeInfo, expected.Type), (actual, expected) => $"Procedure requires {expected} arguments, but was giving {actual}", (actual, expected) => $"Passing wrong type to procedure, expected {expected.Type}, but got {actual.TypeInfo}."); if (!success) { return(false); } return(true); }
protected override bool Visit(ASTCompilerCall node) { throw new NotImplementedException(); }
protected abstract bool Visit(ASTCompilerCall node);