Class: JsonCompleter::ParsingState
- Inherits:
-
Struct
- Object
- Struct
- JsonCompleter::ParsingState
- Defined in:
- lib/json_completer.rb
Overview
Parsing state for incremental processing
Instance Attribute Summary collapse
-
#context_stack ⇒ Object
Returns the value of attribute context_stack.
-
#incomplete_string_buffer ⇒ Object
Returns the value of attribute incomplete_string_buffer.
-
#incomplete_string_escape_state ⇒ Object
Returns the value of attribute incomplete_string_escape_state.
-
#incomplete_string_start ⇒ Object
Returns the value of attribute incomplete_string_start.
-
#input_length ⇒ Object
Returns the value of attribute input_length.
-
#last_index ⇒ Object
Returns the value of attribute last_index.
-
#output_tokens ⇒ Object
Returns the value of attribute output_tokens.
Instance Method Summary collapse
-
#initialize(output_tokens: [], context_stack: [], last_index: 0, input_length: 0, incomplete_string_start: nil, incomplete_string_buffer: nil, incomplete_string_escape_state: nil) ⇒ ParsingState
constructor
A new instance of ParsingState.
Constructor Details
#initialize(output_tokens: [], context_stack: [], last_index: 0, input_length: 0, incomplete_string_start: nil, incomplete_string_buffer: nil, incomplete_string_escape_state: nil) ⇒ ParsingState
Returns a new instance of ParsingState.
18 19 20 21 22 23 24 |
# File 'lib/json_completer.rb', line 18 def initialize( output_tokens: [], context_stack: [], last_index: 0, input_length: 0, incomplete_string_start: nil, incomplete_string_buffer: nil, incomplete_string_escape_state: nil ) super end |
Instance Attribute Details
#context_stack ⇒ Object
Returns the value of attribute context_stack
13 14 15 |
# File 'lib/json_completer.rb', line 13 def context_stack @context_stack end |
#incomplete_string_buffer ⇒ Object
Returns the value of attribute incomplete_string_buffer
13 14 15 |
# File 'lib/json_completer.rb', line 13 def incomplete_string_buffer @incomplete_string_buffer end |
#incomplete_string_escape_state ⇒ Object
Returns the value of attribute incomplete_string_escape_state
13 14 15 |
# File 'lib/json_completer.rb', line 13 def incomplete_string_escape_state @incomplete_string_escape_state end |
#incomplete_string_start ⇒ Object
Returns the value of attribute incomplete_string_start
13 14 15 |
# File 'lib/json_completer.rb', line 13 def incomplete_string_start @incomplete_string_start end |
#input_length ⇒ Object
Returns the value of attribute input_length
13 14 15 |
# File 'lib/json_completer.rb', line 13 def input_length @input_length end |
#last_index ⇒ Object
Returns the value of attribute last_index
13 14 15 |
# File 'lib/json_completer.rb', line 13 def last_index @last_index end |
#output_tokens ⇒ Object
Returns the value of attribute output_tokens
13 14 15 |
# File 'lib/json_completer.rb', line 13 def output_tokens @output_tokens end |