9 小时以前 9bad721754fe8bbe2e5f459d0706e0fefac569f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package cn.iocoder.yudao.module.qcreport.engine.rule;
 
/**
 * 词法单元类型。
 * <p>
 * label 保留前端 {@code engine/rule-engine.ts} 的小写写法,
 * 语法错误提示要在两端逐字一致,用户才不会对同一份规则看到两种说法。
 */
public enum TokenType {
 
    COMMA("comma"),
    EOF("eof"),
    LPAREN("lparen"),
    NUMBER("number"),
    OPERATOR("operator"),
    RPAREN("rparen"),
    STRING("string"),
    WORD("word");
 
    private final String label;
 
    TokenType(String label) {
        this.label = label;
    }
 
    public String label() {
        return label;
    }
 
}