refactor: 优化词法异常的错误信息提示
- 将英文错误信息改为中文,提高用户的可读性和理解度
This commit is contained in:
parent
eae66eac8c
commit
cd64137148
@ -50,6 +50,6 @@ public class UnknownTokenScanner extends AbstractTokenScanner {
|
||||
if (lexeme.isEmpty())
|
||||
lexeme = String.valueOf(ctx.advance());
|
||||
// 抛出词法异常,并带上错误片段与具体位置
|
||||
throw new LexicalException("Illegal character sequence '" + lexeme + "'", line, col);
|
||||
throw new LexicalException("词法错误:非法字符序列 '" + lexeme + "'", line, col);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user