| 程序包 | 说明 |
|---|---|
| org.ssssssss.script.parsing |
| 限定符和类型 | 方法和说明 |
|---|---|
static TokenType[] |
TokenType.getSortedValues() |
TokenType |
Token.getType() |
static TokenType |
TokenType.valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static TokenType[] |
TokenType.values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
| 限定符和类型 | 方法和说明 |
|---|---|
Token |
TokenStream.expect(TokenType type)
Checks if the next token has the give type and optionally consumes, or throws an error if the next token did not match the
type.
|
boolean |
TokenStream.match(boolean consume,
TokenType... types)
Matches any of the token types and optionally consumes the next token in case of a match.
|
boolean |
TokenStream.match(TokenType type,
boolean consume)
Matches and optionally consumes the next token in case of a match.
|
| 构造器和说明 |
|---|
LiteralToken(TokenType type,
Span span) |
RegexpToken(TokenType type,
Span span,
int regFlag) |
Token(TokenType type,
Span span) |
Copyright © 2020–2021. All rights reserved.