class BELParser::Language::Semantics::DeeplyNestedStatementWarning
DeeplyNestedStatementWarning
defines a {SemanticsWarning} that indicates the nested statement threshold was exceeded.
@see DeeplyNestedStatement::NESTING_THRESHOLD
Attributes
nested_number[R]
nested_threshold[R]
Public Class Methods
new(stmt_node, spec, nested_threshold, nested_number)
click to toggle source
Calls superclass method
# File lib/bel_parser/language/semantics/deeply_nested_statement.rb, line 50 def initialize(stmt_node, spec, nested_threshold, nested_number) super(stmt_node, spec) @nested_number = nested_number @nested_threshold = nested_threshold end
Public Instance Methods
to_s()
click to toggle source
# File lib/bel_parser/language/semantics/deeply_nested_statement.rb, line 56 def to_s <<-MSG.gsub(/ {12}/, '').delete("\n") Statement contains more than #{nested_threshold} nested statements (#{nested_number} nested statements). MSG end