Class: SyntaxTree::CSS::CDCToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token containing a CDC (–>). www.w3.org/TR/css-syntax-3/#typedef-cdc-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:) ⇒ CDCToken
constructor
A new instance of CDCToken.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ CDCToken
Returns a new instance of CDCToken.
150 151 152 |
# File 'lib/syntax_tree/css/nodes.rb', line 150 def initialize(location:) @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
148 149 150 |
# File 'lib/syntax_tree/css/nodes.rb', line 148 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
154 155 156 |
# File 'lib/syntax_tree/css/nodes.rb', line 154 def accept(visitor) visitor.visit_cdc_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
158 159 160 |
# File 'lib/syntax_tree/css/nodes.rb', line 158 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
164 165 166 |
# File 'lib/syntax_tree/css/nodes.rb', line 164 def deconstruct_keys(keys) { location: location } end |