From 8982ad59e94b89b8e9a706a58c1689f8129cedc4 Mon Sep 17 00:00:00 2001 From: ekkoruse Date: Wed, 25 Jun 2025 16:14:49 +0800 Subject: [PATCH] source location --- ets2panda/public/es2panda_lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ets2panda/public/es2panda_lib.cpp b/ets2panda/public/es2panda_lib.cpp index 0cfb44268e..8cb204d6c7 100644 --- a/ets2panda/public/es2panda_lib.cpp +++ b/ets2panda/public/es2panda_lib.cpp @@ -961,7 +961,7 @@ extern "C" bool IsAnyError(es2panda_Context *context) extern "C" size_t SourcePositionIndex([[maybe_unused]] es2panda_Context *context, es2panda_SourcePosition *position) { - return reinterpret_cast(position)->index; + return reinterpret_cast(position)->ToLocation().col; } extern "C" size_t SourcePositionLine([[maybe_unused]] es2panda_Context *context, es2panda_SourcePosition *position) -- Gitee