Class: SyntaxTree::CSS::OpenParenToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that represents the use of a (. www.w3.org/TR/css-syntax-3/#tokendef-open-paren
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:) ⇒ OpenParenToken
constructor
A new instance of OpenParenToken.
-
#value ⇒ Object
Here for convenience for comparing between block types.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ OpenParenToken
Returns a new instance of OpenParenToken.
658 659 660 |
# File 'lib/syntax_tree/css/nodes.rb', line 658 def initialize(location:) @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
656 657 658 |
# File 'lib/syntax_tree/css/nodes.rb', line 656 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
662 663 664 |
# File 'lib/syntax_tree/css/nodes.rb', line 662 def accept(visitor) visitor.visit_open_paren_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
666 667 668 |
# File 'lib/syntax_tree/css/nodes.rb', line 666 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
672 673 674 |
# File 'lib/syntax_tree/css/nodes.rb', line 672 def deconstruct_keys(keys) { location: location } end |
#value ⇒ Object
Here for convenience for comparing between block types.
677 678 679 |
# File 'lib/syntax_tree/css/nodes.rb', line 677 def value "(" end |