Exception: MilkTea::CompileTime::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/milk_tea/core/compile_time.rb

Instance Method Summary collapse

Instance Method Details

#codeObject



19
20
21
# File 'lib/milk_tea/core/compile_time.rb', line 19

def code
  "compile_time/error"
end

#to_diagnostic(path: nil) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/milk_tea/core/compile_time.rb', line 23

def to_diagnostic(path: nil)
  Diagnostic.new(
    path: path,
    line: nil,
    column: nil,
    length: nil,
    code: code,
    message: message,
    severity: :error,
  )
end