struct

TreeSitter::Point

Inherits Struct / Value / Object

A point is a line/column tuple.

Constructors

new(row : Int32, column : Int32)
Source
new(point : LibTreeSitter::TSPoint)
Source

Instance methods

==(other : Tuple(Int32, Int32))
Source
column(*args, **options)
Source
column(*args, **options, &)
Source
column=(arg)
Source
inspect(io : IO)

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)"
Source
row(*args, **options)
Source
row(*args, **options, &)
Source
row=(arg)
Source
to_tuple

Returns the point as a tuple of {row, column}.

Source
to_unsafe
Source