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.



458
459
460
# File 'lib/graphql/language/lexer.rb', line 458

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.



438
439
440
# File 'lib/graphql/language/lexer.rb', line 438

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.



212
213
214
# File 'lib/graphql/language/lexer.rb', line 212

def _graphql_lexer_index_offsets
  @_graphql_lexer_index_offsets
end

._graphql_lexer_key_offsetsObject

Returns the value of attribute _graphql_lexer_key_offsets.



51
52
53
# File 'lib/graphql/language/lexer.rb', line 51

def _graphql_lexer_key_offsets
  @_graphql_lexer_key_offsets
end

._graphql_lexer_range_lengthsObject

Returns the value of attribute _graphql_lexer_range_lengths.



192
193
194
# File 'lib/graphql/language/lexer.rb', line 192

def _graphql_lexer_range_lengths
  @_graphql_lexer_range_lengths
end

._graphql_lexer_single_lengthsObject

Returns the value of attribute _graphql_lexer_single_lengths.



172
173
174
# File 'lib/graphql/language/lexer.rb', line 172

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.



418
419
420
# File 'lib/graphql/language/lexer.rb', line 418

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.



325
326
327
# File 'lib/graphql/language/lexer.rb', line 325

def _graphql_lexer_trans_actions
  @_graphql_lexer_trans_actions
end

._graphql_lexer_trans_keysObject

Returns the value of attribute _graphql_lexer_trans_keys.



71
72
73
# File 'lib/graphql/language/lexer.rb', line 71

def _graphql_lexer_trans_keys
  @_graphql_lexer_trans_keys
end

._graphql_lexer_trans_targsObject

Returns the value of attribute _graphql_lexer_trans_targs.



232
233
234
# File 'lib/graphql/language/lexer.rb', line 232

def _graphql_lexer_trans_targs
  @_graphql_lexer_trans_targs
end

.graphql_lexer_en_mainObject

Returns the value of attribute graphql_lexer_en_main.



491
492
493
# File 'lib/graphql/language/lexer.rb', line 491

def graphql_lexer_en_main
  @graphql_lexer_en_main
end

.graphql_lexer_errorObject

Returns the value of attribute graphql_lexer_error.



486
487
488
# File 'lib/graphql/language/lexer.rb', line 486

def graphql_lexer_error
  @graphql_lexer_error
end

.graphql_lexer_first_finalObject

Returns the value of attribute graphql_lexer_first_final.



482
483
484
# File 'lib/graphql/language/lexer.rb', line 482

def graphql_lexer_first_final
  @graphql_lexer_first_final
end

.graphql_lexer_startObject

Returns the value of attribute graphql_lexer_start.



478
479
480
# File 'lib/graphql/language/lexer.rb', line 478

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