예제 #1
0
 public ArithmaticStatement(WordTokens[] tokens, WordTokens left, WordTokens right, WordTokens op, Statement subStatement = null) : base(tokens, subStatement)
 {
     this.left  = left;
     this.right = right;
     this.op    = op;
     this.type  = StatementType.ArithmaticStatement;
 }
예제 #2
0
 public RelationalStatement(WordTokens[] tokens, WordTokens op, WordTokens left, WordTokens right, Statement subStatement = null) : base(tokens, subStatement)
 {
     this.left  = left;
     this.right = right;
     this.op    = op;
     this.type  = StatementType.ConditionalStatement;
 }
예제 #3
0
 public LogicalStatement(WordTokens[] tokens, ConditionStatement left, ConditionStatement right, WordTokens op, Statement subStatement = null) : base(tokens, subStatement)
 {
     this.left  = left;
     this.right = right;
     this.op    = op;
     type       = StatementType.ConditionalStatement;
 }
예제 #4
0
 public bool IsVariable(WordTokens token)
 {
     return(token.tokens.Any(tok => Token.VariableTypes.Any(t => tok.type == t)));
 }
예제 #5
0
 public AssignmentStatement(WordTokens[] tokens, WordTokens variable, WordTokens value, Statement subStatement = null) : base(tokens, subStatement)
 {
     this.variable = variable;
     this.value    = value;
     type          = StatementType.AssignmentStatement;
 }
예제 #6
0
 public bool IsNumeric(WordTokens token)
 {
     return(token.tokens.Any(tok => Token.NumericTypes.Any(t => tok.type == t)));
 }
예제 #7
0
 public ReadStatement(WordTokens[] tokens, WordTokens variable, Statement subStatement = null) : base(tokens, subStatement)
 {
     this.variable = variable;
     type          = StatementType.ReadStatement;
 }