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
29 30 31 |
# File 'lib/graphql/language/lexer.rb', line 29 def _graphql_lexer_char_class @_graphql_lexer_char_class end |
._graphql_lexer_cond_actions ⇒ Object
Returns the value of attribute _graphql_lexer_cond_actions
77 78 79 |
# File 'lib/graphql/language/lexer.rb', line 77 def _graphql_lexer_cond_actions @_graphql_lexer_cond_actions end |
._graphql_lexer_cond_targs ⇒ Object
Returns the value of attribute _graphql_lexer_cond_targs
69 70 71 |
# File 'lib/graphql/language/lexer.rb', line 69 def _graphql_lexer_cond_targs @_graphql_lexer_cond_targs end |
._graphql_lexer_eof_trans ⇒ Object
Returns the value of attribute _graphql_lexer_eof_trans
101 102 103 |
# File 'lib/graphql/language/lexer.rb', line 101 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
93 94 95 |
# File 'lib/graphql/language/lexer.rb', line 93 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
53 54 55 |
# File 'lib/graphql/language/lexer.rb', line 53 def _graphql_lexer_index_defaults @_graphql_lexer_index_defaults end |
._graphql_lexer_index_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_index_offsets
37 38 39 |
# File 'lib/graphql/language/lexer.rb', line 37 def _graphql_lexer_index_offsets @_graphql_lexer_index_offsets end |
._graphql_lexer_indicies ⇒ Object
Returns the value of attribute _graphql_lexer_indicies
45 46 47 |
# File 'lib/graphql/language/lexer.rb', line 45 def _graphql_lexer_indicies @_graphql_lexer_indicies end |
._graphql_lexer_nfa_offsets ⇒ Object
Returns the value of attribute _graphql_lexer_nfa_offsets
117 118 119 |
# File 'lib/graphql/language/lexer.rb', line 117 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
133 134 135 |
# File 'lib/graphql/language/lexer.rb', line 133 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
125 126 127 |
# File 'lib/graphql/language/lexer.rb', line 125 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
109 110 111 |
# File 'lib/graphql/language/lexer.rb', line 109 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
85 86 87 |
# File 'lib/graphql/language/lexer.rb', line 85 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
61 62 63 |
# File 'lib/graphql/language/lexer.rb', line 61 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
21 22 23 |
# File 'lib/graphql/language/lexer.rb', line 21 def _graphql_lexer_trans_keys @_graphql_lexer_trans_keys end |
.graphql_lexer_en_main ⇒ Object
Returns the value of attribute graphql_lexer_en_main
161 162 163 |
# File 'lib/graphql/language/lexer.rb', line 161 def graphql_lexer_en_main @graphql_lexer_en_main end |
.graphql_lexer_en_str ⇒ Object
Returns the value of attribute graphql_lexer_en_str
156 157 158 |
# File 'lib/graphql/language/lexer.rb', line 156 def graphql_lexer_en_str @graphql_lexer_en_str end |
.graphql_lexer_error ⇒ Object
Returns the value of attribute graphql_lexer_error
151 152 153 |
# File 'lib/graphql/language/lexer.rb', line 151 def graphql_lexer_error @graphql_lexer_error end |
.graphql_lexer_first_final ⇒ Object
Returns the value of attribute graphql_lexer_first_final
146 147 148 |
# File 'lib/graphql/language/lexer.rb', line 146 def graphql_lexer_first_final @graphql_lexer_first_final end |
.graphql_lexer_start ⇒ Object
Returns the value of attribute graphql_lexer_start
141 142 143 |
# File 'lib/graphql/language/lexer.rb', line 141 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
12 13 14 15 16 |
# File 'lib/graphql/language/lexer.rb', line 12 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
6 7 8 |
# File 'lib/graphql/language/lexer.rb', line 6 def self.tokenize(query_string) run_lexer(query_string) end |