Class: SyntaxTree::CSS::BadStringToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that was a quotes string that had a syntax error. It is mostly here for error recovery. www.w3.org/TR/css-syntax-3/#typedef-bad-string-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:) ⇒ BadStringToken
constructor
A new instance of BadStringToken.
Methods inherited from Node
Constructor Details
#initialize(value:, location:) ⇒ BadStringToken
Returns a new instance of BadStringToken.
99 100 101 102 |
# File 'lib/syntax_tree/css/nodes.rb', line 99 def initialize(value:, location:) @value = value @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
97 98 99 |
# File 'lib/syntax_tree/css/nodes.rb', line 97 def location @location end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
97 98 99 |
# File 'lib/syntax_tree/css/nodes.rb', line 97 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
104 105 106 |
# File 'lib/syntax_tree/css/nodes.rb', line 104 def accept(visitor) visitor.visit_bad_string_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
108 109 110 |
# File 'lib/syntax_tree/css/nodes.rb', line 108 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
114 115 116 |
# File 'lib/syntax_tree/css/nodes.rb', line 114 def deconstruct_keys(keys) { value: value, location: location } end |