Class EndOfInput

java.lang.Object
dev.frostlake.parser.EndOfInput

public final class EndOfInput extends Object
Where a statement's input ENDS, which is the anchor live gives every refusal that ran out of text — the position one PAST the last character, not the last character itself. Text ending in a newline therefore anchors at column 0 of the line after the last one written.
  • Method Details

    • line

      public static int line(String sql)
      The 1-based line the input ends on.
      Parameters:
      sql - the statement text
      Returns:
      its last line number
    • position

      public static int position(String sql)
      The 0-based column just past the last character on the input's last line.
      Parameters:
      sql - the statement text
      Returns:
      that column