refactor: 修改保留关键字并使用缩写

- 更新保留关键字集合,将 'initializer'缩写为 'init','condition' 缩写为 'cond','update' 缩写为 'step'
This commit is contained in:
Luke 2025-07-14 23:51:36 +08:00
parent 054ab5d63d
commit 536ee64f6d

View File

@ -25,7 +25,7 @@ public class TokenFactory {
/**
* 语言的保留关键字集合
*/
private static final Set<String> KEYWORDS = Set.of("module", "function", "parameter", "return_type", "body", "end", "if", "then", "else", "loop", "declare", "return", "import", "initializer", "condition", "update");
private static final Set<String> KEYWORDS = Set.of("module", "function", "parameter", "return_type", "body", "end", "if", "then", "else", "loop", "declare", "return", "import", "init", "cond", "step");
/**
* 内置类型名称集合 intstring