Class: ExpressionParser::Token
- Inherits:
-
Object
- Object
- ExpressionParser::Token
- Defined in:
- lib/expression_parser/token.rb
Constant Summary collapse
- Plus =
0
- Minus =
1
- Multiply =
2
- Divide =
3
- Number =
4
- LParen =
5
- RParen =
6
- MOD =
7
- GThan =
8
- LThan =
9
- Equal =
10
- NotEqual =
11
- GThanE =
12
- LThanE =
13
- End =
14
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize ⇒ Token
constructor
A new instance of Token.
- #unknown? ⇒ Boolean
Constructor Details
#initialize ⇒ Token
Returns a new instance of Token.
28 29 30 31 |
# File 'lib/expression_parser/token.rb', line 28 def initialize @kind = nil @value = nil end |
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind
25 26 27 |
# File 'lib/expression_parser/token.rb', line 25 def kind @kind end |
#value ⇒ Object
Returns the value of attribute value
26 27 28 |
# File 'lib/expression_parser/token.rb', line 26 def value @value end |
Instance Method Details
#unknown? ⇒ Boolean
33 34 35 |
# File 'lib/expression_parser/token.rb', line 33 def unknown? @kind.nil? end |