refactor: 优化词法错误异常信息格式
- 修改了 LexicalException 类中错误信息的显示格式 - 新格式:文件名 + "行 " +行号 + ", 列 " + 列号 + ": " +错误类型 + ": " +详细信息 - 旧格式:文件名 + ":" + 行号 + ":" + 列号 + ": " + 错误类型 + " '" + 详细信息 + "'"
This commit is contained in:
parent
f6382c4ccd
commit
3d35e81a97
@ -11,7 +11,7 @@ package org.jcnc.snow.compiler.lexer.core;
|
||||
* </ul>
|
||||
* <pre>
|
||||
* 例:
|
||||
* main.s:2:19: 词法错误:非法字符序列 '@' at 2:19
|
||||
* Main.snow: 行 7, 列 20: 词法错误:非法字符序列 '@'
|
||||
* </pre>
|
||||
*/
|
||||
public class LexicalException extends RuntimeException {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user