Module: GraphQL::Language::Lexer
- Defined in:
- lib/graphql/language/lexer.rb
Class Attribute Summary collapse
-
._graphql_lexer_actions ⇒ Object
Returns the value of attribute _graphql_lexer_actions.
-
._graphql_lexer_eof_trans ⇒ Object
Returns the value of attribute _graphql_lexer_eof_trans.
-
._graphql_lexer_from_state_actions ⇒ Object
Returns the value of attribute _graphql_lexer_from_state_actions.
-
._graphql_lexer_index_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_index_offsets.
-
._graphql_lexer_key_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_key_offsets.
-
._graphql_lexer_range_lengths ⇒ Object
Returns the value of attribute _graphql_lexer_range_lengths.
-
._graphql_lexer_single_lengths ⇒ Object
Returns the value of attribute _graphql_lexer_single_lengths.
-
._graphql_lexer_to_state_actions ⇒ Object
Returns the value of attribute _graphql_lexer_to_state_actions.
-
._graphql_lexer_trans_actions ⇒ Object
Returns the value of attribute _graphql_lexer_trans_actions.
-
._graphql_lexer_trans_keys ⇒ Object
Returns the value of attribute _graphql_lexer_trans_keys.
-
._graphql_lexer_trans_targs ⇒ Object
Returns the value of attribute _graphql_lexer_trans_targs.
-
.graphql_lexer_en_main ⇒ Object
Returns the value of attribute graphql_lexer_en_main.
-
.graphql_lexer_error ⇒ Object
Returns the value of attribute graphql_lexer_error.
-
.graphql_lexer_first_final ⇒ Object
Returns the value of attribute graphql_lexer_first_final.
-
.graphql_lexer_start ⇒ Object
Returns the value of attribute graphql_lexer_start.
Class Method Summary collapse
-
.replace_escaped_characters_in_place(raw_string) ⇒ Object
Replace any escaped unicode or whitespace with the actual characters To avoid allocating more strings, this modifies the string passed into it.
- .tokenize(query_string) ⇒ Object
Class Attribute Details
._graphql_lexer_actions ⇒ Object
Returns the value of attribute _graphql_lexer_actions.
28 29 30 |
# File 'lib/graphql/language/lexer.rb', line 28 def _graphql_lexer_actions @_graphql_lexer_actions end |
._graphql_lexer_eof_trans ⇒ Object
Returns the value of attribute _graphql_lexer_eof_trans.
429 430 431 |
# File 'lib/graphql/language/lexer.rb', line 429 def _graphql_lexer_eof_trans @_graphql_lexer_eof_trans end |
._graphql_lexer_from_state_actions ⇒ Object
Returns the value of attribute _graphql_lexer_from_state_actions.
410 411 412 |
# File 'lib/graphql/language/lexer.rb', line 410 def _graphql_lexer_from_state_actions @_graphql_lexer_from_state_actions end |
._graphql_lexer_index_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_index_offsets.
200 201 202 |
# File 'lib/graphql/language/lexer.rb', line 200 def _graphql_lexer_index_offsets @_graphql_lexer_index_offsets end |
._graphql_lexer_key_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_key_offsets.
50 51 52 |
# File 'lib/graphql/language/lexer.rb', line 50 def _graphql_lexer_key_offsets @_graphql_lexer_key_offsets end |
._graphql_lexer_range_lengths ⇒ Object
Returns the value of attribute _graphql_lexer_range_lengths.
181 182 183 |
# File 'lib/graphql/language/lexer.rb', line 181 def _graphql_lexer_range_lengths @_graphql_lexer_range_lengths end |
._graphql_lexer_single_lengths ⇒ Object
Returns the value of attribute _graphql_lexer_single_lengths.
162 163 164 |
# File 'lib/graphql/language/lexer.rb', line 162 def _graphql_lexer_single_lengths @_graphql_lexer_single_lengths end |
._graphql_lexer_to_state_actions ⇒ Object
Returns the value of attribute _graphql_lexer_to_state_actions.
391 392 393 |
# File 'lib/graphql/language/lexer.rb', line 391 def _graphql_lexer_to_state_actions @_graphql_lexer_to_state_actions end |
._graphql_lexer_trans_actions ⇒ Object
Returns the value of attribute _graphql_lexer_trans_actions.
305 306 307 |
# File 'lib/graphql/language/lexer.rb', line 305 def _graphql_lexer_trans_actions @_graphql_lexer_trans_actions end |
._graphql_lexer_trans_keys ⇒ Object
Returns the value of attribute _graphql_lexer_trans_keys.
69 70 71 |
# File 'lib/graphql/language/lexer.rb', line 69 def _graphql_lexer_trans_keys @_graphql_lexer_trans_keys end |
._graphql_lexer_trans_targs ⇒ Object
Returns the value of attribute _graphql_lexer_trans_targs.
219 220 221 |
# File 'lib/graphql/language/lexer.rb', line 219 def _graphql_lexer_trans_targs @_graphql_lexer_trans_targs end |
.graphql_lexer_en_main ⇒ Object
Returns the value of attribute graphql_lexer_en_main.
461 462 463 |
# File 'lib/graphql/language/lexer.rb', line 461 def graphql_lexer_en_main @graphql_lexer_en_main end |
.graphql_lexer_error ⇒ Object
Returns the value of attribute graphql_lexer_error.
456 457 458 |
# File 'lib/graphql/language/lexer.rb', line 456 def graphql_lexer_error @graphql_lexer_error end |
.graphql_lexer_first_final ⇒ Object
Returns the value of attribute graphql_lexer_first_final.
452 453 454 |
# File 'lib/graphql/language/lexer.rb', line 452 def graphql_lexer_first_final @graphql_lexer_first_final end |
.graphql_lexer_start ⇒ Object
Returns the value of attribute graphql_lexer_start.
448 449 450 |
# File 'lib/graphql/language/lexer.rb', line 448 def graphql_lexer_start @graphql_lexer_start end |
Class Method Details
.replace_escaped_characters_in_place(raw_string) ⇒ Object
Replace any escaped unicode or whitespace with the actual characters To avoid allocating more strings, this modifies the string passed into it
17 18 19 20 21 |
# File 'lib/graphql/language/lexer.rb', line 17 def self.replace_escaped_characters_in_place(raw_string) raw_string.gsub!(ESCAPES, ESCAPES_REPLACE) raw_string.gsub!(UTF_8, &UTF_8_REPLACE) nil end |
.tokenize(query_string) ⇒ Object
11 12 13 |
# File 'lib/graphql/language/lexer.rb', line 11 def self.tokenize(query_string) run_lexer(query_string) end |