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 |
|---|---|
protected ParseResult |
parseImpl(String scope,
Environment environment,
Encoding encoding) |
String |
toString() |
getCanonical, isLocal, makeNameFragment, parse, parsepublic final Token token
public final Expression predicate
public While(String name, Token token, Expression predicate, Encoding encoding)
protected ParseResult parseImpl(String scope, Environment environment, Encoding encoding) throws IOException
parseImpl in class TokenIOExceptionCopyright © 2017. All rights reserved.