Interface Position

All Superinterfaces:
Comparable<Position>
All Known Implementing Classes:
InternalPosition

public interface Position extends Comparable<Position>
  • Field Details

  • Method Details

    • line

      int line()
      The line number in a file. First line number is 1.
    • lineOffset

      int lineOffset()
      The line offset in a file. First line offset is 0. (lineOffset() == line() - 1)
    • column

      int column()
      The column number at the specified line. First column number is 1. (column() == columnOffset() + 1)
    • columnOffset

      int columnOffset()
      The column offset at the specified line. First column offset is 0. (columnOffset() == column() - 1)
    • at

      static Position at(int line, int column)
    • isBefore

      boolean isBefore(Position other)
    • isAfter

      boolean isAfter(Position other)
    • startOf

      static Position startOf(Tree tree)
    • endOf

      static Position endOf(Tree tree)
    • startOf

      static Position startOf(SyntaxTrivia trivia)
    • endOf

      static Position endOf(SyntaxTrivia trivia)
    • startOf

      static Position startOf(SyntaxToken token)
    • endOf

      static Position endOf(SyntaxToken token)