Class: Jade::Parsing::MissingThenError
- Defined in:
- lib/jade/parsing/error.rb
Overview
Specific case-branch shape: ‘in <pat> <body>` on the same source line, no `then` between them. Almost always the user meant `in <pat> then <body>` for an inline branch.
Instance Attribute Summary
Attributes inherited from Error
Attributes inherited from Error
Instance Method Summary collapse
Methods inherited from Error
#commit, #committed?, #initialize, #with_context
Methods inherited from Error
#candidates, #initialize, #notes, #queried_name, #to_diagnostic
Constructor Details
This class inherits a constructor from Jade::Parsing::Error
Instance Method Details
#label ⇒ Object
131 132 133 |
# File 'lib/jade/parsing/error.rb', line 131 def label "missing `then`" end |
#message ⇒ Object
124 125 126 127 128 129 |
# File 'lib/jade/parsing/error.rb', line 124 def "#{context_prefix}Case branch needs `then` before an inline body " \ "(got #{@actual.value.inspect} on the same line as `in`). " \ "Write `in <pat> then <expr>`, or put the body on the next " \ "line for the multi-statement form." end |