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_indicies ⇒ Object
Returns the value of attribute _graphql_lexer_indicies.
-
._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.
214 215 216 |
# File 'lib/graphql/language/lexer.rb', line 214 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.
202 203 204 |
# File 'lib/graphql/language/lexer.rb', line 202 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.
117 118 119 |
# File 'lib/graphql/language/lexer.rb', line 117 def _graphql_lexer_index_offsets @_graphql_lexer_index_offsets end |
._graphql_lexer_indicies ⇒ Object
Returns the value of attribute _graphql_lexer_indicies.
129 130 131 |
# File 'lib/graphql/language/lexer.rb', line 129 def _graphql_lexer_indicies @_graphql_lexer_indicies end |
._graphql_lexer_key_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_key_offsets.
46 47 48 |
# File 'lib/graphql/language/lexer.rb', line 46 def _graphql_lexer_key_offsets @_graphql_lexer_key_offsets end |
._graphql_lexer_range_lengths ⇒ Object
Returns the value of attribute _graphql_lexer_range_lengths.
105 106 107 |
# File 'lib/graphql/language/lexer.rb', line 105 def _graphql_lexer_range_lengths @_graphql_lexer_range_lengths end |
._graphql_lexer_single_lengths ⇒ Object
Returns the value of attribute _graphql_lexer_single_lengths.
93 94 95 |
# File 'lib/graphql/language/lexer.rb', line 93 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.
190 191 192 |
# File 'lib/graphql/language/lexer.rb', line 190 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.
175 176 177 |
# File 'lib/graphql/language/lexer.rb', line 175 def _graphql_lexer_trans_actions @_graphql_lexer_trans_actions end |
._graphql_lexer_trans_keys ⇒ Object
Returns the value of attribute _graphql_lexer_trans_keys.
58 59 60 |
# File 'lib/graphql/language/lexer.rb', line 58 def _graphql_lexer_trans_keys @_graphql_lexer_trans_keys end |
._graphql_lexer_trans_targs ⇒ Object
Returns the value of attribute _graphql_lexer_trans_targs.
160 161 162 |
# File 'lib/graphql/language/lexer.rb', line 160 def _graphql_lexer_trans_targs @_graphql_lexer_trans_targs end |
.graphql_lexer_en_main ⇒ Object
Returns the value of attribute graphql_lexer_en_main.
239 240 241 |
# File 'lib/graphql/language/lexer.rb', line 239 def graphql_lexer_en_main @graphql_lexer_en_main end |
.graphql_lexer_error ⇒ Object
Returns the value of attribute graphql_lexer_error.
234 235 236 |
# File 'lib/graphql/language/lexer.rb', line 234 def graphql_lexer_error @graphql_lexer_error end |
.graphql_lexer_first_final ⇒ Object
Returns the value of attribute graphql_lexer_first_final.
230 231 232 |
# File 'lib/graphql/language/lexer.rb', line 230 def graphql_lexer_first_final @graphql_lexer_first_final end |
.graphql_lexer_start ⇒ Object
Returns the value of attribute graphql_lexer_start.
226 227 228 |
# File 'lib/graphql/language/lexer.rb', line 226 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 |