Indentation { public Parser<Token> outdent() { return token(outdent); } 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 testOutdent() { Parser<Token> parser = new Indentation().outdent(); assertEquals(new Token(0, 0, Indentation.Punctuation.OUTDENT), parser.from(Parsers.constant(tokenList(Indentation.Punctuation.OUTDENT))).parse("", mode)); Asserts.assertFailure(mode, parser.from(Parsers.constant(tokenList(Indentation.Punctuation.INDENT))), "", 1, 1, "OUTDENT expected, INDENT encountered."); }