Class: JMESPath::Token Private
- Inherits:
-
Struct
- Object
- Struct
- JMESPath::Token
- Defined in:
- lib/jmespath/token.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- NULL_TOKEN =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Token.new(:eof, '', nil)
- BINDING_POWER =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ Lexer::T_UNKNOWN => 0, Lexer::T_EOF => 0, Lexer::T_QUOTED_IDENTIFIER => 0, Lexer::T_IDENTIFIER => 0, Lexer::T_RBRACKET => 0, Lexer::T_RPAREN => 0, Lexer::T_COMMA => 0, Lexer::T_RBRACE => 0, Lexer::T_NUMBER => 0, Lexer::T_CURRENT => 0, Lexer::T_EXPREF => 0, Lexer::T_COLON => 0, Lexer::T_PIPE => 1, Lexer::T_OR => 2, Lexer::T_AND => 3, Lexer::T_COMPARATOR => 5, Lexer::T_FLATTEN => 9, Lexer::T_STAR => 20, Lexer::T_FILTER => 21, Lexer::T_DOT => 40, Lexer::T_NOT => 45, Lexer::T_LBRACE => 50, Lexer::T_LBRACKET => 55, Lexer::T_LPAREN => 60 }.freeze
Instance Attribute Summary collapse
-
#binding_power ⇒ Object
Returns the value of attribute binding_power.
-
#position ⇒ Object
Returns the value of attribute position.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type, value, position) ⇒ Token
constructor
private
A new instance of Token.
Constructor Details
#initialize(type, value, position) ⇒ Token
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Token.
37 38 39 |
# File 'lib/jmespath/token.rb', line 37 def initialize(type, value, position) super(type, value, position, BINDING_POWER[type]) end |
Instance Attribute Details
#binding_power ⇒ Object
Returns the value of attribute binding_power
4 5 6 |
# File 'lib/jmespath/token.rb', line 4 def binding_power @binding_power end |
#position ⇒ Object
Returns the value of attribute position
4 5 6 |
# File 'lib/jmespath/token.rb', line 4 def position @position end |
#type ⇒ Object
Returns the value of attribute type
4 5 6 |
# File 'lib/jmespath/token.rb', line 4 def type @type end |
#value ⇒ Object
Returns the value of attribute value
4 5 6 |
# File 'lib/jmespath/token.rb', line 4 def value @value end |