module Lucid::AST::HasLocation

Public Instance Methods

file() click to toggle source
# File lib/lucid/ast/location.rb, line 26
def file
  location.file
end
file_colon_line() click to toggle source
# File lib/lucid/ast/location.rb, line 22
def file_colon_line
  location.to_s
end
line() click to toggle source
# File lib/lucid/ast/location.rb, line 30
def line
  location.line
end
location() click to toggle source
# File lib/lucid/ast/location.rb, line 34
def location
  raise('Please set @location in the constructor') unless @location
  raise("@location must be an AST::Location but is a #{@location.class}") unless @location.is_a?(Location)
  @location
end