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