Indentation { public Parser<Token> indent() { return token(indent); } Indentation(Object indent, Object outdent);  Indentation(); Parser<Token> indent(); Parser<Token> outdent(); Parser<List<Token>> lexer(Parser<?> tokenizer, Parser<?> delim); static final Parser<Void> WHITESPACES; }
@Test public void testIndent() { Parser<Token> parser = new Indentation().indent(); assertEquals(new Token(0, 0, Indentation.Punctuation.INDENT), parser.from(Parsers.constant(tokenList(Indentation.Punctuation.INDENT))).parse("", mode)); Asserts.assertFailure(mode, parser.from(Parsers.constant(tokenList(Indentation.Punctuation.OUTDENT))), "", 1, 1, "INDENT expected, OUTDENT encountered."); }