Skip to content

Require tokens in state definitions, disallow predicates #35

@jdrem

Description

@jdrem

Instead of this:

 public static class SQLToken extends Token {
        @KeywordToken
        final static Predicate<Token> SELECT = (t) -> t.getValue().equalsIgnoreCase("SELECT");
  }
  protected void init {
     addState(0, SELECT, 1, (s, c) -> new SelectRequest());
  }

Do this instead:

  public static class SQLToken extends Token {
    final static Token SELECT = new Token.Keyword("SELECT");
  }
  protected void init {
    addState(0, SELECT, 1, (s, c) -> new SelectRequest());
  }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions