public AssignCommand(Position position, string name, Expression expression) : base(position) { _name = name; _expression = expression; _expression.Parent = this; }
public WhileCommand(Position position, Expression expression, Command command) : base(position) { _expression = expression; _expression.Parent = this; _command = command; _command.Parent = this; }
public FunctionExpression(Position position, string name, Expression[] arguments) : base(position) { _name = name; _arguments = arguments; foreach (Expression argument in _arguments) argument.Parent = this; }
public CallCommand(Position position, string identifier, Expression[] arguments) : base(position) { _identifier = identifier; _arguments = arguments; foreach (Expression argument in _arguments) argument.Parent = this; }
public IfCommand(Position position, Expression expression, Command @if, Command @else) : base(position) { _expression = expression; _expression.Parent = this; _if = @if; _if.Parent = this; _else = @else; _else.Parent = this; }
public FunctionDeclaration(Position position, string name, AST.Type type, ParameterDeclaration[] parameters, Expression body) : base(position, name, SymbolKind.Function, type) { _parameters = parameters; foreach (ParameterDeclaration parameter in _parameters) parameter.Parent = this; // body MAY be null for predefined functions _body = body; if (_body != null) _body.Parent = this; }
public ParenthesisExpression(Position position, Expression expression) : base(position) { _expression = expression; _expression.Parent = this; }
public ConstantDeclaration(Position position, string name, AST.Type type, Expression expression) : base(position, name, SymbolKind.Constant, type) { _expression = expression; _expression.Parent = this; }