Module: GraphQL::Language::Lexer

Defined in:
lib/graphql/language/lexer.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

._graphql_lexer_actionsObject

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_transObject

Returns the value of attribute _graphql_lexer_eof_trans.



273
274
275
# File 'lib/graphql/language/lexer.rb', line 273

def _graphql_lexer_eof_trans
  @_graphql_lexer_eof_trans
end

._graphql_lexer_from_state_actionsObject

Returns the value of attribute _graphql_lexer_from_state_actions.



259
260
261
# File 'lib/graphql/language/lexer.rb', line 259

def _graphql_lexer_from_state_actions
  @_graphql_lexer_from_state_actions
end

._graphql_lexer_index_offsetsObject

Returns the value of attribute _graphql_lexer_index_offsets.



147
148
149
# File 'lib/graphql/language/lexer.rb', line 147

def _graphql_lexer_index_offsets
  @_graphql_lexer_index_offsets
end

._graphql_lexer_indiciesObject

Returns the value of attribute _graphql_lexer_indicies.



161
162
163
# File 'lib/graphql/language/lexer.rb', line 161

def _graphql_lexer_indicies
  @_graphql_lexer_indicies
end

._graphql_lexer_key_offsetsObject

Returns the value of attribute _graphql_lexer_key_offsets.



47
48
49
# File 'lib/graphql/language/lexer.rb', line 47

def _graphql_lexer_key_offsets
  @_graphql_lexer_key_offsets
end

._graphql_lexer_range_lengthsObject

Returns the value of attribute _graphql_lexer_range_lengths.



133
134
135
# File 'lib/graphql/language/lexer.rb', line 133

def _graphql_lexer_range_lengths
  @_graphql_lexer_range_lengths
end

._graphql_lexer_single_lengthsObject

Returns the value of attribute _graphql_lexer_single_lengths.



119
120
121
# File 'lib/graphql/language/lexer.rb', line 119

def _graphql_lexer_single_lengths
  @_graphql_lexer_single_lengths
end

._graphql_lexer_to_state_actionsObject

Returns the value of attribute _graphql_lexer_to_state_actions.



245
246
247
# File 'lib/graphql/language/lexer.rb', line 245

def _graphql_lexer_to_state_actions
  @_graphql_lexer_to_state_actions
end

._graphql_lexer_trans_actionsObject

Returns the value of attribute _graphql_lexer_trans_actions.



227
228
229
# File 'lib/graphql/language/lexer.rb', line 227

def _graphql_lexer_trans_actions
  @_graphql_lexer_trans_actions
end

._graphql_lexer_trans_keysObject

Returns the value of attribute _graphql_lexer_trans_keys.



61
62
63
# File 'lib/graphql/language/lexer.rb', line 61

def _graphql_lexer_trans_keys
  @_graphql_lexer_trans_keys
end

._graphql_lexer_trans_targsObject

Returns the value of attribute _graphql_lexer_trans_targs.



209
210
211
# File 'lib/graphql/language/lexer.rb', line 209

def _graphql_lexer_trans_targs
  @_graphql_lexer_trans_targs
end

.graphql_lexer_en_mainObject

Returns the value of attribute graphql_lexer_en_main.



300
301
302
# File 'lib/graphql/language/lexer.rb', line 300

def graphql_lexer_en_main
  @graphql_lexer_en_main
end

.graphql_lexer_errorObject

Returns the value of attribute graphql_lexer_error.



295
296
297
# File 'lib/graphql/language/lexer.rb', line 295

def graphql_lexer_error
  @graphql_lexer_error
end

.graphql_lexer_first_finalObject

Returns the value of attribute graphql_lexer_first_final.



291
292
293
# File 'lib/graphql/language/lexer.rb', line 291

def graphql_lexer_first_final
  @graphql_lexer_first_final
end

.graphql_lexer_startObject

Returns the value of attribute graphql_lexer_start.



287
288
289
# File 'lib/graphql/language/lexer.rb', line 287

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