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.
202 203 204 |
# File 'lib/graphql/language/lexer.rb', line 202 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.
191 192 193 |
# File 'lib/graphql/language/lexer.rb', line 191 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.
110 111 112 |
# File 'lib/graphql/language/lexer.rb', line 110 def _graphql_lexer_index_offsets @_graphql_lexer_index_offsets end |
._graphql_lexer_indicies ⇒ Object
Returns the value of attribute _graphql_lexer_indicies.
121 122 123 |
# File 'lib/graphql/language/lexer.rb', line 121 def _graphql_lexer_indicies @_graphql_lexer_indicies end |
._graphql_lexer_key_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_key_offsets.
45 46 47 |
# File 'lib/graphql/language/lexer.rb', line 45 def _graphql_lexer_key_offsets @_graphql_lexer_key_offsets end |
._graphql_lexer_range_lengths ⇒ Object
Returns the value of attribute _graphql_lexer_range_lengths.
99 100 101 |
# File 'lib/graphql/language/lexer.rb', line 99 def _graphql_lexer_range_lengths @_graphql_lexer_range_lengths end |
._graphql_lexer_single_lengths ⇒ Object
Returns the value of attribute _graphql_lexer_single_lengths.
88 89 90 |
# File 'lib/graphql/language/lexer.rb', line 88 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.
180 181 182 |
# File 'lib/graphql/language/lexer.rb', line 180 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.
165 166 167 |
# File 'lib/graphql/language/lexer.rb', line 165 def _graphql_lexer_trans_actions @_graphql_lexer_trans_actions end |
._graphql_lexer_trans_keys ⇒ Object
Returns the value of attribute _graphql_lexer_trans_keys.
56 57 58 |
# File 'lib/graphql/language/lexer.rb', line 56 def _graphql_lexer_trans_keys @_graphql_lexer_trans_keys end |
._graphql_lexer_trans_targs ⇒ Object
Returns the value of attribute _graphql_lexer_trans_targs.
150 151 152 |
# File 'lib/graphql/language/lexer.rb', line 150 def _graphql_lexer_trans_targs @_graphql_lexer_trans_targs end |
.graphql_lexer_en_main ⇒ Object
Returns the value of attribute graphql_lexer_en_main.
226 227 228 |
# File 'lib/graphql/language/lexer.rb', line 226 def graphql_lexer_en_main @graphql_lexer_en_main end |
.graphql_lexer_error ⇒ Object
Returns the value of attribute graphql_lexer_error.
221 222 223 |
# File 'lib/graphql/language/lexer.rb', line 221 def graphql_lexer_error @graphql_lexer_error end |
.graphql_lexer_first_final ⇒ Object
Returns the value of attribute graphql_lexer_first_final.
217 218 219 |
# File 'lib/graphql/language/lexer.rb', line 217 def graphql_lexer_first_final @graphql_lexer_first_final end |
.graphql_lexer_start ⇒ Object
Returns the value of attribute graphql_lexer_start.
213 214 215 |
# File 'lib/graphql/language/lexer.rb', line 213 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 |