public class TypeParser extends Object implements TypeParserConstants
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Field and Description |
|---|---|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
TypeParserTokenManager |
token_source
Generated Token Manager.
|
COLON, COMMA, DEFAULT, DOT, EOF, GENERIC_LIST, GENERIC_MAP, IDENT, LANGLE, LBRACKET, QMARK, RANGLE, RBRACKET, tokenImage, UNEXPECTED_TOKEN, VBAR, WS| Constructor and Description |
|---|
TypeParser(InputStream stream)
Constructor with InputStream.
|
TypeParser(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding
|
TypeParser(Reader stream)
Constructor.
|
TypeParser(String input,
SourceLocation sourceLocation,
SoyTypeRegistry typeRegistry)
Constructor that takes a string input.
|
TypeParser(TypeParserTokenManager tm)
Constructor with generated Token Manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
SoyType |
parseTypeDeclaration()
Attempts to parse the input as a type declaration.
|
void |
ReInit(InputStream stream)
Reinitialise.
|
void |
ReInit(InputStream stream,
String encoding)
Reinitialise.
|
void |
ReInit(Reader stream)
Reinitialise.
|
void |
ReInit(TypeParserTokenManager tm)
Reinitialise.
|
public TypeParserTokenManager token_source
public Token token
public Token jj_nt
public TypeParser(String input, SourceLocation sourceLocation, SoyTypeRegistry typeRegistry)
input - The input to parse.sourceLocation - The location.typeRegistry - The type registry.public TypeParser(InputStream stream)
public TypeParser(InputStream stream, String encoding)
public TypeParser(Reader stream)
public TypeParser(TypeParserTokenManager tm)
public SoyType parseTypeDeclaration()
TokenMgrError - When the input has a token error.SoySyntaxException - When the input has a parse error.public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
public void ReInit(TypeParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()