public class While extends Token
Token that specifies a conditional repetition of a token.
A While consists of a token (a Token) and a
predicate (an Expression). Each loop,
predicate is evaluated. If it evaluates to true,
token is parsed. If that succeeds, the loop is repeated. When
predicate evaluates to false, the While
terminates and succeeds. If parsing token fails, the While
also fails.
Expression| Modifier and Type | Field and Description |
|---|---|
Expression |
predicate |
Token |
token |
| Constructor and Description |
|---|
While(String name,
Token token,
Expression predicate,
Encoding encoding) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
protected Optional<ParseState> |
parseImpl(Environment environment) |
String |
toString() |
getCanonical, isLocal, makeNameFragment, parsepublic final Token token
public final Expression predicate
public While(String name, Token token, Expression predicate, Encoding encoding)
protected Optional<ParseState> parseImpl(Environment environment)
Copyright © 2017. All rights reserved.