Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require tokens in state definitions, disallow predicates #35

Open
jdrem opened this issue Mar 19, 2022 · 0 comments
Open

Require tokens in state definitions, disallow predicates #35

jdrem opened this issue Mar 19, 2022 · 0 comments
Milestone

Comments

@jdrem
Copy link
Owner

jdrem commented Mar 19, 2022

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 = new Token.Keyword("SELECT");
  }
  protected void init {
    addState(0, SELECT, 1, (s, c) -> new SelectRequest());
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant