struct TreeSitter::Point

Overview

A point is a line/column tuple.

Defined in:

tree_sitter/point.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(row : Int32, column : Int32) #

[View source]
def self.new(point : LibTreeSitter::TSPoint) #

[View source]

Instance Method Detail

def ==(tuple : Tuple(Int32, Int32)) #

[View source]
def column(*args, **options) #

[View source]
def column(*args, **options, &) #

[View source]
def column=(arg) #

[View source]
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)"

[View source]
def row(*args, **options) #

[View source]
def row(*args, **options, &) #

[View source]
def row=(arg) #

[View source]
def to_tuple : Tuple(Int32, Int32) #

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


[View source]
def to_unsafe : LibTreeSitter::TSPoint #

[View source]