Class: JsonCompleter::ParseState

Inherits:
Struct
  • Object
show all
Defined in:
lib/json_completer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root: nil, root_assigned: false, context_stack: [], last_index: 0, input_length: 0, token_state: nil, input_snapshot: nil) ⇒ ParseState

Returns a new instance of ParseState.



28
29
30
31
32
33
# File 'lib/json_completer.rb', line 28

def initialize(
  root: nil, root_assigned: false, context_stack: [], last_index: 0, input_length: 0, token_state: nil,
  input_snapshot: nil
)
  super
end

Instance Attribute Details

#context_stack ⇒ Object

Returns the value of attribute context_stack

Returns:

  • (Object) —

    the current value of context_stack



24
25
26
# File 'lib/json_completer.rb', line 24

def context_stack
  @context_stack
end

#input_length ⇒ Object

Returns the value of attribute input_length

Returns:

  • (Object) —

    the current value of input_length



24
25
26
# File 'lib/json_completer.rb', line 24

def input_length
  @input_length
end

#input_snapshot ⇒ Object

Returns the value of attribute input_snapshot

Returns:

  • (Object) —

    the current value of input_snapshot



24
25
26
# File 'lib/json_completer.rb', line 24

def input_snapshot
  @input_snapshot
end

#last_index ⇒ Object

Returns the value of attribute last_index

Returns:

  • (Object) —

    the current value of last_index



24
25
26
# File 'lib/json_completer.rb', line 24

def last_index
  @last_index
end

#root ⇒ Object

Returns the value of attribute root

Returns:

  • (Object) —

    the current value of root



24
25
26
# File 'lib/json_completer.rb', line 24

def root
  @root
end

#root_assigned ⇒ Object

Returns the value of attribute root_assigned

Returns:

  • (Object) —

    the current value of root_assigned



24
25
26
# File 'lib/json_completer.rb', line 24

def root_assigned
  @root_assigned
end

#token_state ⇒ Object

Returns the value of attribute token_state

Returns:

  • (Object) —

    the current value of token_state



24
25
26
# File 'lib/json_completer.rb', line 24

def token_state
  @token_state
end