From ad0cd3a39d5d77ec32d2f203c7258f727a06ba6e Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 26 Mar 2026 11:16:37 +0800 Subject: feat: add m_end position to AST nodes - Add end line and column (m_end.m_line, m_end.m_col) to AST output - New AST format: [name, begin_line, begin_col, end_line, end_col, ...children] - Update format_spec.yue to normalize end positions for comparison - Add ast_spec.yue tests for AST end position feature Closes #251 --- spec/outputs/test/format_spec.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec/outputs/test/format_spec.lua') diff --git a/spec/outputs/test/format_spec.lua b/spec/outputs/test/format_spec.lua index c9ea3c2..d38a0ad 100644 --- a/spec/outputs/test/format_spec.lua +++ b/spec/outputs/test/format_spec.lua @@ -164,7 +164,9 @@ local rewriteLineCol rewriteLineCol = function(item) item[2] = 0 item[3] = 0 - for i = 4, #item do + item[4] = 0 + item[5] = 0 + for i = 6, #item do local _exp_0 = type(item[i]) if "table" == _exp_0 then if item[i][1] == "comment" then -- cgit v1.2.3-55-g6feb