use of org.sonar.sslr.grammar.LexerlessGrammarBuilder in project sonar-java by SonarSource.
the class TryStatementTest method ok.
@Test
public void ok() {
LexerlessGrammarBuilder b = JavaLexer.createGrammarBuilder();
assertThat(b, JavaLexer.STATEMENT).matches("try {} catch (Exception e) {} catch (Exception e) {} finally {}").matches("try {} catch (Exception e) {} finally {}").matches("try {} catch (Exception e) {}").matches("try {} finally {}");
}
use of org.sonar.sslr.grammar.LexerlessGrammarBuilder in project sonar-java by SonarSource.
the class TypeParameterTest method ok.
@Test
public void ok() {
LexerlessGrammarBuilder b = JavaLexer.createGrammarBuilder();
assertThat(b, JavaLexer.TYPE_PARAMETER).matches("identifier").matches("identifier extends Foo").matches("identifier extends Foo & Bar");
}
Aggregations