Class: SyntaxTree::CSS::DelimToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that has a value composed of a single code point. www.w3.org/TR/css-syntax-3/#typedef-delim-token
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(value:, location:) ⇒ DelimToken
constructor
A new instance of DelimToken.
Methods inherited from Node
Constructor Details
#initialize(value:, location:) ⇒ DelimToken
Returns a new instance of DelimToken.
416 417 418 419 |
# File 'lib/syntax_tree/css/nodes.rb', line 416 def initialize(value:, location:) @value = value @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
414 415 416 |
# File 'lib/syntax_tree/css/nodes.rb', line 414 def location @location end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
414 415 416 |
# File 'lib/syntax_tree/css/nodes.rb', line 414 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
421 422 423 |
# File 'lib/syntax_tree/css/nodes.rb', line 421 def accept(visitor) visitor.visit_delim_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
425 426 427 |
# File 'lib/syntax_tree/css/nodes.rb', line 425 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
431 432 433 |
# File 'lib/syntax_tree/css/nodes.rb', line 431 def deconstruct_keys(keys) { value: value, location: location } end |