Class: SyntaxTree::CSS::SemicolonToken

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

Overview

A parsed token that contains a comma. www.w3.org/TR/css-syntax-3/#typedef-semicolon-token

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#format, #pretty_print

Constructor Details

#initialize(location:) ⇒ SemicolonToken

Returns a new instance of SemicolonToken.



769
770
771
# File 'lib/syntax_tree/css/nodes.rb', line 769

def initialize(location:)
  @location = Location.from(location)
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



767
768
769
# File 'lib/syntax_tree/css/nodes.rb', line 767

def location
  @location
end

Instance Method Details

#accept(visitor) ⇒ Object



773
774
775
# File 'lib/syntax_tree/css/nodes.rb', line 773

def accept(visitor)
  visitor.visit_semicolon_token(self)
end

#child_nodesObject Also known as: deconstruct



777
778
779
# File 'lib/syntax_tree/css/nodes.rb', line 777

def child_nodes
  []
end

#deconstruct_keys(keys) ⇒ Object



783
784
785
# File 'lib/syntax_tree/css/nodes.rb', line 783

def deconstruct_keys(keys)
  { location: location }
end