Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
import org.sonar.sslr.parser.LexerlessGrammar;
import org.sonar.sslr.tests.Assertions;

public class DoStatementTest {
class DoStatementTest {

private final LexerlessGrammar g = FlexGrammar.createGrammar();

@Test
public void test() {
void test() {
Assertions.assertThat(g.rule(FlexGrammar.DO_STATEMENT))
.matches("do { } while (condition)");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public class ThrowStatementTest {
private final LexerlessGrammar g = FlexGrammar.createGrammar();

@Test
public void eos_is_line_terminator() {
void eos_is_line_terminator() {
Assertions.assertThat(g.rule(FlexGrammar.THROW_STATEMENT))
.matchesPrefix("throw \n", "another-statement ;")
.matchesPrefix("throw expression \n", "another-statement ;")
.matchesPrefix("throw \n", ";");
}

@Test
public void eos_is_semicolon() {
void eos_is_semicolon() {
Assertions.assertThat(g.rule(FlexGrammar.THROW_STATEMENT))
.matchesPrefix("throw ;", "another-statement")
.matchesPrefix("throw expression ;", "another-statement");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.sonar.sslr.parser.LexerlessGrammar;
import org.sonar.sslr.tests.Assertions;

public class TryStatementTest {
class TryStatementTest {

private final LexerlessGrammar g = FlexGrammar.createGrammar();

Expand Down