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/inputs/test/format_spec.yue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec/inputs/test/format_spec.yue') diff --git a/spec/inputs/test/format_spec.yue b/spec/inputs/test/format_spec.yue index 8c6096a..310b610 100644 --- a/spec/inputs/test/format_spec.yue +++ b/spec/inputs/test/format_spec.yue @@ -165,7 +165,9 @@ import "yue" rewriteLineCol = (item)-> item[2] = 0 item[3] = 0 - for i = 4, #item + item[4] = 0 + item[5] = 0 + for i = 6, #item switch type item[i] when "table" if item[i][1] == "comment" table.remove item, i -- cgit v1.2.3-55-g6feb