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



14
15
16
# File 'lib/milk_tea/core/compile_time.rb', line 14

def code
  "compile_time/error"
end

#to_diagnostic(path: nil) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/milk_tea/core/compile_time.rb', line 18

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