Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 4
0
 public bool IsVariable(WordTokens token)
 {
     return(token.tokens.Any(tok => Token.VariableTypes.Any(t => tok.type == t)));
 }
Esempio n. 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;
 }
Esempio n. 6
0
 public bool IsNumeric(WordTokens token)
 {
     return(token.tokens.Any(tok => Token.NumericTypes.Any(t => tok.type == t)));
 }
Esempio n. 7
0
 public ReadStatement(WordTokens[] tokens, WordTokens variable, Statement subStatement = null) : base(tokens, subStatement)
 {
     this.variable = variable;
     type          = StatementType.ReadStatement;
 }