@Test public void tieWithEmptyListFromDataExpression() { final Token token = seq(any("a"), tie(any("b"), last(ref("c")))); final Optional<ParseState> result = token.parse(env(stream(0))); assertTrue(result.isPresent()); assertTrue(result.get().order.head.asGraph().head.asGraph().isEmpty()); }
public Tie(final String name, final Token token, final ValueExpression dataExpression, final Encoding encoding) { super(name, encoding); this.token = checkNotNull(token, "token"); this.dataExpression = checkNotNull(dataExpression, "dataExpression"); }
Tie extends Token { public Tie(final String name, final Token token, final ValueExpression dataExpression, final Encoding encoding) { super(name, encoding); this.token = checkNotNull(token, "token"); this.dataExpression = checkNotNull(dataExpression, "dataExpression"); } }
Tie extends Token { public Tie(final String name, final Token token, final ValueExpression dataExpression, final Encoding encoding) { super(name, encoding); this.token = checkNotNull(token, "token"); this.dataExpression = checkNotNull(dataExpression, "dataExpression"); } Tie(final String name, final Token token, final ValueExpression dataExpression, final Encoding encoding); }
Tie extends Token { public Tie(final String name, final Token token, final ValueExpression dataExpression, final Encoding encoding) { super(name, encoding); this.token = checkNotNull(token, "token"); this.dataExpression = checkNotNull(dataExpression, "dataExpression"); } Tie(final String name, final Token token, final ValueExpression dataExpression, final Encoding encoding); @Override String toString(); @Override boolean equals(final Object obj); @Override int hashCode(); }
Tie extends Token { public Tie(final String name, final Token token, final ValueExpression dataExpression, final Encoding encoding) { super(name, encoding); this.token = checkNotNull(token, "token"); this.dataExpression = checkNotNull(dataExpression, "dataExpression"); } Tie(final String name, final Token token, final ValueExpression dataExpression, final Encoding encoding); @Override String toString(); @Override boolean equals(final Object obj); @Override int hashCode(); final Token token; final ValueExpression dataExpression; }