Class: Pgsqlarbiter::Token
- Inherits:
-
Data
- Object
- Data
- Pgsqlarbiter::Token
- Defined in:
- lib/pgsqlarbiter/token.rb
Overview
Immutable token produced by the Lexer.
Instance Attribute Summary collapse
-
#position ⇒ Integer
readonly
Character offset in the original SQL string.
-
#type ⇒ Symbol
readonly
Token type (one of the TokenType constants).
-
#value ⇒ String?
readonly
The token text (+nil+ for EOF).
Instance Attribute Details
#position ⇒ Integer (readonly)
Returns character offset in the original SQL string.
12 |
# File 'lib/pgsqlarbiter/token.rb', line 12 Token = Data.define(:type, :value, :position) |
#type ⇒ Symbol (readonly)
Returns token type (one of the Pgsqlarbiter::TokenType constants).
12 |
# File 'lib/pgsqlarbiter/token.rb', line 12 Token = Data.define(:type, :value, :position) |
#value ⇒ String? (readonly)
Returns the token text (+nil+ for EOF).
12 |
# File 'lib/pgsqlarbiter/token.rb', line 12 Token = Data.define(:type, :value, :position) |