Class: SyntaxTree::CSS::CommaToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that contains a comma. www.w3.org/TR/css-syntax-3/#typedef-comma-token
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(location:) ⇒ CommaToken
constructor
A new instance of CommaToken.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ CommaToken
Returns a new instance of CommaToken.
309 310 311 |
# File 'lib/syntax_tree/css/nodes.rb', line 309 def initialize(location:) @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
307 308 309 |
# File 'lib/syntax_tree/css/nodes.rb', line 307 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
313 314 315 |
# File 'lib/syntax_tree/css/nodes.rb', line 313 def accept(visitor) visitor.visit_comma_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
317 318 319 |
# File 'lib/syntax_tree/css/nodes.rb', line 317 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
323 324 325 |
# File 'lib/syntax_tree/css/nodes.rb', line 323 def deconstruct_keys(keys) { location: location } end |