Class: BELParser::Language::Semantics::NestedStatementWithoutObjectWarning

Inherits:
SemanticsWarning show all
Defined in:
lib/bel_parser/language/semantics/nested_statement_without_object.rb

Overview

Represents a SemanticsWarning when a nested Parsers::AST::Statement does not have an object.

Instance Attribute Summary collapse

Attributes inherited from SemanticsResult

#expression_node, #specification

Instance Method Summary collapse

Methods inherited from SemanticsWarning

#failure?, #success?

Methods inherited from SemanticsResult

#failure?, #msg, #success?

Constructor Details

#initialize(stmt_node, spec) ⇒ NestedStatementWithoutObjectWarning

Returns a new instance of NestedStatementWithoutObjectWarning.



31
32
33
# File 'lib/bel_parser/language/semantics/nested_statement_without_object.rb', line 31

def initialize(stmt_node, spec)
  super(stmt_node, spec)
end

Instance Attribute Details

#non_causal_relationshipObject (readonly)

Returns the value of attribute non_causal_relationship.



29
30
31
# File 'lib/bel_parser/language/semantics/nested_statement_without_object.rb', line 29

def non_causal_relationship
  @non_causal_relationship
end

Instance Method Details

#to_sObject



35
36
37
38
39
# File 'lib/bel_parser/language/semantics/nested_statement_without_object.rb', line 35

def to_s
  <<-MSG.gsub(/ {12}/, '')
    Nested statement does not have an object.
  MSG
end