Class: SyntaxTree::CSS::Parser::State

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/css/parser.rb

Overview

This is used to communicate between the various tokenization algorithms. It transports a value along with the new index.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, index) ⇒ State

Returns a new instance of State.



17
18
19
20
# File 'lib/syntax_tree/css/parser.rb', line 17

def initialize(value, index)
  @value = value
  @index = index
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



15
16
17
# File 'lib/syntax_tree/css/parser.rb', line 15

def index
  @index
end

#valueObject (readonly)

Returns the value of attribute value.



15
16
17
# File 'lib/syntax_tree/css/parser.rb', line 15

def value
  @value
end