struct TreeSitter::Point
- TreeSitter::Point
- Struct
- Value
- Object
Overview
A point is a line/column tuple.
Defined in:
tree_sitter/point.crConstructors
Instance Method Summary
- #==(tuple : Tuple(Int32, Int32))
- #column(*args, **options)
- #column(*args, **options, &)
- #column=(arg)
-
#inspect(io : IO)
Appends this struct's name and instance variables names and values to the given IO.
- #row(*args, **options)
- #row(*args, **options, &)
- #row=(arg)
-
#to_tuple : Tuple(Int32, Int32)
Returns the point as a tuple of {row, column}.
- #to_unsafe : LibTreeSitter::TSPoint
Constructor Detail
Instance Method Detail
def inspect(io : IO)
#
Description copied from struct Struct
Appends this struct's name and instance variables names and values to the given IO.
struct Point
def initialize(@x : Int32, @y : Int32)
end
end
p1 = Point.new 1, 2
p1.to_s # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"