Class: BELParser::Language::Semantics::SemanticsArgumentLengthWarning
- Inherits:
-
SemanticsWarning
- Object
- SemanticsResult
- SemanticsWarning
- BELParser::Language::Semantics::SemanticsArgumentLengthWarning
- Defined in:
- lib/bel_parser/language/semantics_ast_warnings.rb
Instance Attribute Summary collapse
-
#actual_type ⇒ Object
readonly
Returns the value of attribute actual_type.
-
#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, actual) ⇒ SemanticsArgumentLengthWarning
constructor
A new instance of SemanticsArgumentLengthWarning.
- #to_s ⇒ Object
Methods inherited from SemanticsWarning
Methods inherited from SemanticsResult
Constructor Details
#initialize(expression_node, spec, expected, actual) ⇒ SemanticsArgumentLengthWarning
Returns a new instance of SemanticsArgumentLengthWarning.
50 51 52 53 54 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 50 def initialize(expression_node, spec, expected, actual) super(expression_node, spec) @expected_length = expected.arguments.length @actual_length = actual.arguments.length end |
Instance Attribute Details
#actual_type ⇒ Object (readonly)
Returns the value of attribute actual_type.
48 49 50 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 48 def actual_type @actual_type end |
#expected_type ⇒ Object (readonly)
Returns the value of attribute expected_type.
48 49 50 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 48 def expected_type @expected_type end |
Instance Method Details
#to_s ⇒ Object
56 57 58 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 56 def to_s %(Expected #@expected_length arguments, but saw #@actual_length arguments.) end |