public String toString () { return getKeyword(); } }
public static String[] keywords () { List<String> list = new ListBuilder<JtwigKeyword>().add(JtwigKeyword.values()).build(extractWord()); return list.toArray(new String[list.size()]); }
public String explain(InvalidInputError error) { ErrorInfo known = findKnownError(error.getFailedMatchers()); if (known == null) return "Unknown Error"; else { switch (known.getKnownError()) { case Keyword: return "Expecting one of keywords (" + StringUtils.join(JtwigKeyword.keywords(), ", ") + ")"; case SpecificKeyword: return specificKeyword(known.getChild().element.matcher.getLabel()); } throw new RuntimeException("Expecting explanation"); } }
public static String[] keywords () { List<String> list = new ListBuilder<JtwigKeyword>().add(JtwigKeyword.values()).build(extractWord()); return list.toArray(new String[list.size()]); }
public String explain(InvalidInputError error) { ErrorInfo known = findKnownError(error.getFailedMatchers()); if (known == null) return "Unknown Error"; else { switch (known.getKnownError()) { case Keyword: return "Expecting one of keywords (" + StringUtils.join(JtwigKeyword.keywords(), ", ") + ")"; case SpecificKeyword: return specificKeyword(known.getChild().element.matcher.getLabel()); } throw new RuntimeException("Expecting explanation"); } }
public String apply(JtwigKeyword elem) { return elem.getKeyword(); } };
@MemoMismatches public Rule anyKeyword() { return Sequence( FirstOf(JtwigKeyword.keywords()), TestNot(letterOrDigit()) ); }
public String apply(JtwigKeyword elem) { return elem.getKeyword(); } };
@MemoMismatches public Rule anyKeyword() { return Sequence( FirstOf(JtwigKeyword.keywords()), TestNot(letterOrDigit()) ); }
public String toString () { return getKeyword(); } }
@SuppressNode public Rule keyword(JtwigKeyword keyword) { return terminal(keyword.getKeyword(), letterOrDigit()); }
@SuppressNode public Rule keyword(JtwigKeyword keyword) { return terminal(keyword.getKeyword(), letterOrDigit()); }