示例#1
0
 public SwitchStatement(HappySourceLocation startsAt, HappySourceLocation endsAt, ExpressionNodeBase switchExpression, SwitchCase[] cases, StatementBlock defaultCase)
     : base(startsAt, endsAt)
 {
     this.SwitchExpression = switchExpression;
     this.Cases = cases;
     this.DefaultStatementBlock = defaultCase;
 }
示例#2
0
 public BinaryExpression(ExpressionNodeBase lvalue, Operator oper, ExpressionNodeBase rvalue)
     : base(lvalue.Location, rvalue.Location)
 {
     this.LeftValue = lvalue;
     this.RightValue = rvalue;
     this.Operator = oper;
 }
示例#3
0
 public IfStatement(HappySourceLocation startsAt, ExpressionNodeBase value, StatementBlock trueStatementBlock, StatementBlock falseStatementBlock)
     : base(startsAt, falseStatementBlock != null ? falseStatementBlock.Location : trueStatementBlock.Location)
 {
     _condition = value;
     _trueStatementBlock = trueStatementBlock;
     _falseStatementBlock = falseStatementBlock;
 }
示例#4
0
 public ForStatement(HappySourceLocation span, Identifier loopVariable, ExpressionNodeBase enumerable, ExpressionNodeBase between, ExpressionNodeBase where, StatementBlock loopBody)
     : base(span, loopBody.Location)
 {
     _loopVariable = loopVariable;
     _enumerable = enumerable;
     _between = between;
     _where = where != null ? new ForWhereClause(where.Location, _loopVariable.Text, where) : null;
     _loopBody = loopBody;
 }
示例#5
0
 public FunctionCallExpression(HappySourceLocation startsAt, HappySourceLocation endsAt, Identifier templateIdentifier, ExpressionNodeBase[] arguments)
     : base(startsAt, endsAt, templateIdentifier)
 {
     _arguments = arguments;
 }
示例#6
0
 public ArgumentList(HappySourceLocation location, ExpressionNodeBase[] arguments)
     : base(location)
 {
     this.Arguments = arguments;
 }
示例#7
0
 public virtual void AfterRightExpressionVisit(ExpressionNodeBase node)
 {
     //Intentionally left blank
 }
示例#8
0
 public OutputStatement(ExpressionNodeBase[] expressionsToWrite)
     : base(expressionsToWrite.First().Location, expressionsToWrite.Last().Location)
 {
     _expressionsToWrite = expressionsToWrite;
 }
示例#9
0
 public WhileStatement(HappySourceLocation startsAt, ExpressionNodeBase condition, StatementBlock block)
     : base(startsAt, block.Location)
 {
     Block = block;
     this.Condition = condition;
 }
示例#10
0
 public ReturnStatement(HappySourceLocation location, ExpressionNodeBase returnExp)
     : base(location, returnExp != null ? returnExp.Location : location)
 {
     this.ReturnExp = returnExp;
 }
示例#11
0
 public ForWhereClause(HappySourceLocation startsAt, string loopVariableName, ExpressionNodeBase expressionNode)
     : base(startsAt, expressionNode.Location)
 {
     LoopVariableName = loopVariableName;
     _expressionNode = expressionNode;
 }
示例#12
0
 public VariableDef(Identifier identifier, ExpressionNodeBase defaultExpression)
     : base(identifier.Location, defaultExpression != null ? defaultExpression.Location : null, identifier)
 {
     this.InitializerExpression = defaultExpression;
 }
示例#13
0
 public NewObjectExpression(HappySourceLocation startsAt, HappySourceLocation endsAt, ExpressionNodeBase typeExpression, ExpressionNodeBase[] constructorArgs)
     : base(startsAt, endsAt)
 {
     this.TypeExpression = typeExpression;
     this.ConstructorAgs = constructorArgs;
 }
示例#14
0
 public UnaryExpression(ExpressionNodeBase value, Operator oper)
     : base(oper.Location, value.Location)
 {
     this.Value = value;
     this.Operator = oper;
 }
示例#15
0
 public SwitchCase(ExpressionNodeBase[] caseValues, StatementBlock statements)
     : base(statements.Location)
 {
     this.CaseValues = caseValues;
     this.CaseStatementBlock = statements;
 }