Module: GraphQL::Language::Lexer
- Defined in:
- lib/graphql/language/lexer.rb
Class Attribute Summary collapse
-
._graphql_lexer_char_class ⇒ Object
Returns the value of attribute _graphql_lexer_char_class.
-
._graphql_lexer_cond_actions ⇒ Object
Returns the value of attribute _graphql_lexer_cond_actions.
-
._graphql_lexer_cond_targs ⇒ Object
Returns the value of attribute _graphql_lexer_cond_targs.
-
._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_defaults ⇒ Object
Returns the value of attribute _graphql_lexer_index_defaults.
-
._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_nfa_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_offsets.
-
._graphql_lexer_nfa_pop_trans ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_pop_trans.
-
._graphql_lexer_nfa_push_actions ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_push_actions.
-
._graphql_lexer_nfa_targs ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_targs.
-
._graphql_lexer_to_state_actions ⇒ Object
Returns the value of attribute _graphql_lexer_to_state_actions.
-
._graphql_lexer_trans_cond_spaces ⇒ Object
Returns the value of attribute _graphql_lexer_trans_cond_spaces.
-
._graphql_lexer_trans_keys ⇒ Object
Returns the value of attribute _graphql_lexer_trans_keys.
-
.graphql_lexer_en_main ⇒ Object
Returns the value of attribute graphql_lexer_en_main.
-
.graphql_lexer_en_str ⇒ Object
Returns the value of attribute graphql_lexer_en_str.
-
.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_char_class ⇒ Object
Returns the value of attribute _graphql_lexer_char_class.
30 31 32 |
# File 'lib/graphql/language/lexer.rb', line 30 def _graphql_lexer_char_class @_graphql_lexer_char_class end |
._graphql_lexer_cond_actions ⇒ Object
Returns the value of attribute _graphql_lexer_cond_actions.
78 79 80 |
# File 'lib/graphql/language/lexer.rb', line 78 def _graphql_lexer_cond_actions @_graphql_lexer_cond_actions end |
._graphql_lexer_cond_targs ⇒ Object
Returns the value of attribute _graphql_lexer_cond_targs.
70 71 72 |
# File 'lib/graphql/language/lexer.rb', line 70 def _graphql_lexer_cond_targs @_graphql_lexer_cond_targs end |
._graphql_lexer_eof_trans ⇒ Object
Returns the value of attribute _graphql_lexer_eof_trans.
102 103 104 |
# File 'lib/graphql/language/lexer.rb', line 102 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.
94 95 96 |
# File 'lib/graphql/language/lexer.rb', line 94 def _graphql_lexer_from_state_actions @_graphql_lexer_from_state_actions end |
._graphql_lexer_index_defaults ⇒ Object
Returns the value of attribute _graphql_lexer_index_defaults.
54 55 56 |
# File 'lib/graphql/language/lexer.rb', line 54 def _graphql_lexer_index_defaults @_graphql_lexer_index_defaults end |
._graphql_lexer_index_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_index_offsets.
38 39 40 |
# File 'lib/graphql/language/lexer.rb', line 38 def _graphql_lexer_index_offsets @_graphql_lexer_index_offsets end |
._graphql_lexer_indicies ⇒ Object
Returns the value of attribute _graphql_lexer_indicies.
46 47 48 |
# File 'lib/graphql/language/lexer.rb', line 46 def _graphql_lexer_indicies @_graphql_lexer_indicies end |
._graphql_lexer_nfa_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_offsets.
118 119 120 |
# File 'lib/graphql/language/lexer.rb', line 118 def _graphql_lexer_nfa_offsets @_graphql_lexer_nfa_offsets end |
._graphql_lexer_nfa_pop_trans ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_pop_trans.
134 135 136 |
# File 'lib/graphql/language/lexer.rb', line 134 def _graphql_lexer_nfa_pop_trans @_graphql_lexer_nfa_pop_trans end |
._graphql_lexer_nfa_push_actions ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_push_actions.
126 127 128 |
# File 'lib/graphql/language/lexer.rb', line 126 def _graphql_lexer_nfa_push_actions @_graphql_lexer_nfa_push_actions end |
._graphql_lexer_nfa_targs ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_targs.
110 111 112 |
# File 'lib/graphql/language/lexer.rb', line 110 def _graphql_lexer_nfa_targs @_graphql_lexer_nfa_targs end |
._graphql_lexer_to_state_actions ⇒ Object
Returns the value of attribute _graphql_lexer_to_state_actions.
86 87 88 |
# File 'lib/graphql/language/lexer.rb', line 86 def _graphql_lexer_to_state_actions @_graphql_lexer_to_state_actions end |
._graphql_lexer_trans_cond_spaces ⇒ Object
Returns the value of attribute _graphql_lexer_trans_cond_spaces.
62 63 64 |
# File 'lib/graphql/language/lexer.rb', line 62 def _graphql_lexer_trans_cond_spaces @_graphql_lexer_trans_cond_spaces end |
._graphql_lexer_trans_keys ⇒ Object
Returns the value of attribute _graphql_lexer_trans_keys.
22 23 24 |
# File 'lib/graphql/language/lexer.rb', line 22 def _graphql_lexer_trans_keys @_graphql_lexer_trans_keys end |
.graphql_lexer_en_main ⇒ Object
Returns the value of attribute graphql_lexer_en_main.
162 163 164 |
# File 'lib/graphql/language/lexer.rb', line 162 def graphql_lexer_en_main @graphql_lexer_en_main end |
.graphql_lexer_en_str ⇒ Object
Returns the value of attribute graphql_lexer_en_str.
157 158 159 |
# File 'lib/graphql/language/lexer.rb', line 157 def graphql_lexer_en_str @graphql_lexer_en_str end |
.graphql_lexer_error ⇒ Object
Returns the value of attribute graphql_lexer_error.
152 153 154 |
# File 'lib/graphql/language/lexer.rb', line 152 def graphql_lexer_error @graphql_lexer_error end |
.graphql_lexer_first_final ⇒ Object
Returns the value of attribute graphql_lexer_first_final.
147 148 149 |
# File 'lib/graphql/language/lexer.rb', line 147 def graphql_lexer_first_final @graphql_lexer_first_final end |
.graphql_lexer_start ⇒ Object
Returns the value of attribute graphql_lexer_start.
142 143 144 |
# File 'lib/graphql/language/lexer.rb', line 142 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
13 14 15 16 17 |
# File 'lib/graphql/language/lexer.rb', line 13 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
7 8 9 |
# File 'lib/graphql/language/lexer.rb', line 7 def self.tokenize(query_string) run_lexer(query_string) end |