Class: Foxtail::Syntax::Parser::AST::Junk
- Inherits:
-
SyntaxNode
- Object
- BaseNode
- SyntaxNode
- Foxtail::Syntax::Parser::AST::Junk
- Defined in:
- lib/foxtail/syntax/parser/ast/junk.rb
Overview
Represents unparseable content with associated error annotations
Instance Attribute Summary collapse
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#content ⇒ Object
Returns the value of attribute content.
Attributes inherited from SyntaxNode
Attributes inherited from BaseNode
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(content, annotations = []) ⇒ Junk
constructor
A new instance of Junk.
Methods inherited from SyntaxNode
Methods inherited from BaseNode
Constructor Details
#initialize(content, annotations = []) ⇒ Junk
Returns a new instance of Junk.
12 13 14 15 16 |
# File 'lib/foxtail/syntax/parser/ast/junk.rb', line 12 def initialize(content, annotations=[]) super() @content = content @annotations = annotations end |
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations.
10 11 12 |
# File 'lib/foxtail/syntax/parser/ast/junk.rb', line 10 def annotations @annotations end |
#content ⇒ Object
Returns the value of attribute content.
9 10 11 |
# File 'lib/foxtail/syntax/parser/ast/junk.rb', line 9 def content @content end |
Instance Method Details
#children ⇒ Object
18 |
# File 'lib/foxtail/syntax/parser/ast/junk.rb', line 18 def children = annotations |