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