Syntax::Location
Inherits Comparable < Reference < Object
A location of an ASTnode, including its filename, line number and column number.
Constructors
Instance methods
<=>(other)
Sourcebetween?(min, max)
Sourcecolumn_number
Sourcedirname
Returns the directory name of this location's filename. If the filename is a VirtualFile, this is invoked on its expanded location.
expanded_location
Returns the Location whose filename is a String, not a VirtualFile, traversing virtual file expanded locations.
filename
SourceAppends 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>
line_number
Sourcemacro_location
Returns the Location whose filename is a String, not a VirtualFile, traversing virtual file expanded locations leading to the original user source code
pretty_print(pp)
Source