refactor: 优化词法错误异常信息格式

- 修改了 LexicalException 类中错误信息的显示格式
- 新格式:文件名 + "行 " +行号 + ", 列 " + 列号 + ": " +错误类型 + ": " +详细信息
- 旧格式:文件名 + ":" + 行号 + ":" + 列号 + ": " + 错误类型 + " '" + 详细信息 + "'"
This commit is contained in:
Luke 2025-07-16 11:26:12 +08:00
parent f6382c4ccd
commit 3d35e81a97

View File

@ -11,7 +11,7 @@ package org.jcnc.snow.compiler.lexer.core;
* </ul> * </ul>
* <pre> * <pre>
* *
* main.s:2:19: 词法错误非法字符序列 '@' at 2:19 * Main.snow: 7, 20: 词法错误非法字符序列 '@'
* </pre> * </pre>
*/ */
public class LexicalException extends RuntimeException { public class LexicalException extends RuntimeException {