Class: SyntaxTree::CSS::BadURLToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that was a call to “url” that had a syntax error. It is mostly here for error recovery. www.w3.org/TR/css-syntax-3/#typedef-bad-url-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:) ⇒ BadURLToken
constructor
A new instance of BadURLToken.
Methods inherited from Node
Constructor Details
#initialize(value:, location:) ⇒ BadURLToken
Returns a new instance of BadURLToken.
125 126 127 128 |
# File 'lib/syntax_tree/css/nodes.rb', line 125 def initialize(value:, location:) @value = value @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
123 124 125 |
# File 'lib/syntax_tree/css/nodes.rb', line 123 def location @location end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
123 124 125 |
# File 'lib/syntax_tree/css/nodes.rb', line 123 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
130 131 132 |
# File 'lib/syntax_tree/css/nodes.rb', line 130 def accept(visitor) visitor.visit_bad_url_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
134 135 136 |
# File 'lib/syntax_tree/css/nodes.rb', line 134 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
140 141 142 |
# File 'lib/syntax_tree/css/nodes.rb', line 140 def deconstruct_keys(keys) { value: value, location: location } end |