@Test @DisplayName("The lexer returns regular expressions with / in it") void testRegex() { final var lexer = new Lexer("/\\s*\\/[a-zA-Z]/"); final var lexeme = lexer.get(); Assertions.assertEquals(Lexeme.Type.REGEX,lexeme.type); Assertions.assertEquals("\\s*/[a-zA-Z]",lexeme.string); }
public Lexeme get() { final var ret = lookAhead != null ? lookAhead : next(); lookAhead = next(); return ret; }
Lexer { public Lexeme get() { final var ret = lookAhead != null ? lookAhead : next(); lookAhead = next(); return ret; } }
Lexer { public Lexeme get() { final var ret = lookAhead != null ? lookAhead : next(); lookAhead = next(); return ret; } Lexer(final String input);  Lexer(final String input, boolean selectorExpression); }
Lexer { public Lexeme get() { final var ret = lookAhead != null ? lookAhead : next(); lookAhead = next(); return ret; } Lexer(final String input);  Lexer(final String input, boolean selectorExpression); @Override String toString(); String rest(); Lexeme get(); Lexeme peek(); }
Lexer { public Lexeme get() { final var ret = lookAhead != null ? lookAhead : next(); lookAhead = next(); return ret; } Lexer(final String input);  Lexer(final String input, boolean selectorExpression); @Override String toString(); String rest(); Lexeme get(); Lexeme peek();  }