Class MqlLexer

java.lang.Object
net.hollowcube.mql.parser.MqlLexer

public class MqlLexer extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    MqlLexer(@NotNull String source)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    expect(net.hollowcube.mql.parser.MqlToken.Type type)
     
    @Nullable net.hollowcube.mql.parser.MqlToken
    Returns the next token in the input, or null if the end of file was reached.
    @Nullable net.hollowcube.mql.parser.MqlToken
    Returns the next token without stepping to the next token in the input, or null if the end of file was reached.
    @NotNull String
    span(@NotNull net.hollowcube.mql.parser.MqlToken token)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MqlLexer

      public MqlLexer(@NotNull @NotNull String source)
  • Method Details

    • next

      @Nullable public @Nullable net.hollowcube.mql.parser.MqlToken next()
      Returns the next token in the input, or null if the end of file was reached.
      Throws:
      MqlParseError - if there is an unexpected token.
    • peek

      @Nullable public @Nullable net.hollowcube.mql.parser.MqlToken peek()
      Returns the next token without stepping to the next token in the input, or null if the end of file was reached.
      Throws:
      MqlParseError - if there is an unexpected token.
    • expect

      public void expect(@NotNull net.hollowcube.mql.parser.MqlToken.Type type)
    • span

      @NotNull public @NotNull String span(@NotNull @NotNull net.hollowcube.mql.parser.MqlToken token)