From 7e29eb6b33f2a8ab6bc953ddf804be49f23a0334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 13 Sep 2024 12:15:50 +0200 Subject: [PATCH] Hoist originalLine and originalColumn --- source-map.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source-map.bs b/source-map.bs index 3df796b..1e89050 100644 --- a/source-map.bs +++ b/source-map.bs @@ -409,6 +409,8 @@ sources=] |sources|, run the followi 1. Let |decodedMappings| be a new empty [=list=]. 1. Let |groups| be the result of [=strictly split|strictly splitting=] |mappings| on `;`. 1. Let |generatedLine| be 0. +1. Let |originalLine| be 0. +1. Let |originalColumn| be 0. 1. Let |sourceIndex| be 0. 1. Let |nameIndex| be 0. 1. While |generatedLine| is less than |groups|'s [=list/size=]: @@ -416,8 +418,6 @@ sources=] |sources|, run the followi 1. Let |segments| be the result of [=strictly split|strictly splitting=] |groups|[|generatedLine|] on `,`. 1. Let |generatedColumn| be 0. - 1. Let |originalLine| be 0. - 1. Let |originalColumn| be 0. 1. [=For each=] |segment| in |segments|: 1. Let |position| be a [=position variable=] for |segment|, initially pointing at |segment|'s start.