refactor: 移除词法分析中的异常抛出

This commit is contained in:
Luke 2025-07-16 22:21:31 +08:00
parent c4d9be8403
commit 2be4848735

View File

@ -55,12 +55,6 @@ public class LexerEngine {
TokenPrinter.print(tokens); TokenPrinter.print(tokens);
/* 4. 统一报告错误 */ /* 4. 统一报告错误 */
report(errors); report(errors);
if (!errors.isEmpty()) {
throw new LexicalException(
"",
context.getLine(), context.getCol()
);
}
} }
public static void report(List<LexicalError> errors) { public static void report(List<LexicalError> errors) {