Class: Jade::Frontend::SemanticAnalysis::Error::InvalidListRestPattern

Inherits:
Error
  • Object
show all
Defined in:
lib/jade/frontend/semantic_analysis/error/invalid_list_rest_pattern.rb

Instance Attribute Summary

Attributes inherited from Error

#entry, #span

Instance Method Summary collapse

Methods inherited from Error

#candidates, #notes, #queried_name, #to_diagnostic

Constructor Details

#initialize(entry, span) ⇒ InvalidListRestPattern

Returns a new instance of InvalidListRestPattern.



6
7
8
# File 'lib/jade/frontend/semantic_analysis/error/invalid_list_rest_pattern.rb', line 6

def initialize(entry, span)
  super(entry:, span:)
end

Instance Method Details

#labelObject



14
15
16
# File 'lib/jade/frontend/semantic_analysis/error/invalid_list_rest_pattern.rb', line 14

def label
  "invalid rest pattern"
end

#messageObject



10
11
12
# File 'lib/jade/frontend/semantic_analysis/error/invalid_list_rest_pattern.rb', line 10

def message
  "List rest pattern must be a name (e.g. `xs`) or wildcard (`_`)"
end