public FunctionNode(Token token, VariableIdNode idNode, ParametersNode parametersNode, BlockNode block, Scope scope) : base(token, scope) { this.block = block; this.parameters = parametersNode; this.returnType = idNode != null ? idNode.VariableType : TokenType.UNDEFINED; this.idNode = idNode; }
public void VisitParametersNode(ParametersNode node) { foreach (Parameter param in node.Parameters) { if (paramPassedAsReferenceOnly(param.ParameterType) && !param.Reference) { analyzer.notifyError(new ParameterMustBeReferenceError(node, param.ParameterType)); } } }
public ParameterMustBeReferenceError(ParametersNode node, TokenType type) : base(ErrorConstants.PARAM_ERROR_TITLE, ErrorConstants.PARAM_REFERENCE_MSG(type), node) { }
public FunctionNode CreateFunctionNode(Token token, INameFactory labelFactory, VariableIdNode idNode, ParametersNode parameters, BlockNode blockNode, Scope scope) { return(new FunctionNode(token, idNode, parameters, blockNode, scope)); }
public ProcedureNode(Token token, INameFactory labelFactory, VariableIdNode idNode, ParametersNode parametersNode, BlockNode block, Scope scope) : base(token, idNode, parametersNode, block, scope) { }
public void VisitParametersNode(ParametersNode node) { }