public class RepN extends Token
Token that specifies a bounded repetition of a token.
A RepN consists of a token (a Token) and an
n (a ValueExpression). First n is
evaluated. Parsing fails if it does not evaluate to a single value. The
token is then parsed for an amount of times equal to the evaluated value of
n. RepN succeeds if this succeeds.
Rep,
ValueExpression| Modifier and Type | Field and Description |
|---|---|
ValueExpression |
n |
Token |
token |
| Constructor and Description |
|---|
RepN(String name,
Token token,
ValueExpression n,
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 ValueExpression n
public RepN(String name, Token token, ValueExpression n, Encoding encoding)
protected Optional<ParseState> parseImpl(Environment environment)
Copyright © 2017. All rights reserved.