public void VisitArgumentsNode(ArgumentsNode node) { List <ExpressionNode> arguments = node.Arguments; foreach (ExpressionNode arg in arguments) { arg.Accept(this); if (arg.Variable) { Property p = arg.Scope.GetProperty(arg.VariableID); if (!p.Assigned) { analyzer.notifyError(new UninitializedVariableError(arg)); } } } }
public void VisitFunctionCallNode(FunctionCallNode node) { node.Accept(this.typeChecker); VariableIdNode idNode = node.IdNode; ArgumentsNode arguments = node.ArgumentsNode; idNode.Accept(this); if (arguments != null) { arguments.Accept(this); if (!analyzer.SyntaxTree.Root.Functions.ContainsKey(idNode.ID)) { analyzer.notifyError(new NotAValidFunctionError(idNode)); } else { FunctionNode function = analyzer.SyntaxTree.Root.Functions [idNode.ID]; CompareParamsAndArgs(node, function.Parameters.Parameters, arguments.Arguments); } } }
public FunctionCallNode CreateFunctionCallNode(VariableIdNode idNode, ArgumentsNode arguments, Token token, Scope scope) { return(new FunctionCallNode(token, scope, idNode, arguments)); }
public IOPrintNode(Token token, ArgumentsNode arguments, Scope scope) : base(token, scope) { this.arguments = arguments; }
public FunctionCallNode(Token token, Scope scope, VariableIdNode idNode, ArgumentsNode argumentsNode = null) : base(token, scope) { this.idNode = idNode; this.argumentsNode = argumentsNode; }
public void VisitArgumentsNode(ArgumentsNode node) { }