Class: BELParser::Language::Semantics::SemanticsNilNodeWarning
- Inherits:
-
SemanticsWarning
- Object
- SemanticsResult
- SemanticsWarning
- BELParser::Language::Semantics::SemanticsNilNodeWarning
- Defined in:
- lib/bel_parser/language/semantics_ast_warnings.rb
Instance Attribute Summary collapse
-
#expected_type ⇒ Object
readonly
Returns the value of attribute expected_type.
Attributes inherited from SemanticsResult
#expression_node, #specification
Instance Method Summary collapse
-
#initialize(expression_node, spec, expected) ⇒ SemanticsNilNodeWarning
constructor
A new instance of SemanticsNilNodeWarning.
- #to_s ⇒ Object
Methods inherited from SemanticsWarning
Methods inherited from SemanticsResult
Constructor Details
#initialize(expression_node, spec, expected) ⇒ SemanticsNilNodeWarning
Returns a new instance of SemanticsNilNodeWarning.
10 11 12 13 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 10 def initialize(expression_node, spec, expected) super(expression_node, spec) @expected_type = expected.ast_type end |
Instance Attribute Details
#expected_type ⇒ Object (readonly)
Returns the value of attribute expected_type.
8 9 10 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 8 def expected_type @expected_type end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 15 def to_s %(Missing the #{@expected_type} type.) end |