class Taro::Compiler::Location

Defined in:

compiler/location.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(file : String = "", row : Int32 = 0, column : Int32 = 0, length : Int32 = 0) #

[View source]

Instance Method Detail

def column : Int32 #

[View source]
def column=(column : Int32) #

[View source]
def dirname : String | Nil #

[View source]
def file : String #

[View source]
def file=(file : String) #

[View source]
def inspect(io : IO) #
Description copied from class Reference

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>

[View source]
def inspect #
Description copied from class Object

Returns an unambiguous and information-rich string representation of this object, typically intended for developers.

This method should usually not be overridden. It delegates to #inspect(IO) which can be overridden for custom implementations.

Also see #to_s.


[View source]
def length : Int32 #

[View source]
def length=(length : Int32) #

[View source]
def row : Int32 #

[View source]
def row=(row : Int32) #

[View source]
def to_s(io : IO) #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]
def to_s(colorize = false) #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]