Class: BELParser::Language::Semantics::ListFunctionSubjectWarning
- Inherits:
-
SemanticsWarning
- Object
- SemanticsResult
- SemanticsWarning
- BELParser::Language::Semantics::ListFunctionSubjectWarning
- Defined in:
- lib/bel_parser/language/semantics/list_function_subject.rb
Overview
ListFunctionSubjectWarning defines a SemanticsWarning that indicates that a list Parsers::AST::Term was used as the Parsers::AST::Subject of a Parsers::AST::Statement.
Instance Attribute Summary
Attributes inherited from SemanticsResult
#expression_node, #specification
Instance Method Summary collapse
-
#initialize(subject_node, spec) ⇒ ListFunctionSubjectWarning
constructor
A new instance of ListFunctionSubjectWarning.
- #to_s ⇒ Object
Methods inherited from SemanticsWarning
Methods inherited from SemanticsResult
Constructor Details
#initialize(subject_node, spec) ⇒ ListFunctionSubjectWarning
Returns a new instance of ListFunctionSubjectWarning.
35 36 37 |
# File 'lib/bel_parser/language/semantics/list_function_subject.rb', line 35 def initialize(subject_node, spec) super(subject_node, spec) end |
Instance Method Details
#to_s ⇒ Object
39 40 41 42 43 |
# File 'lib/bel_parser/language/semantics/list_function_subject.rb', line 39 def to_s <<-MSG.gsub(/ {12}/, '').delete("\n") List term is only valid in the Object of a Statement. MSG end |