From 5afff30ddafc84317d35a4d091a00563d818b899 Mon Sep 17 00:00:00 2001 From: Nathan Faubion Date: Sun, 22 May 2022 08:29:30 -0700 Subject: [PATCH] Fix length calculation of symbol tokens Fixes #44 --- src/PureScript/CST/Lexer.purs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PureScript/CST/Lexer.purs b/src/PureScript/CST/Lexer.purs index aa63638..2d84305 100644 --- a/src/PureScript/CST/Lexer.purs +++ b/src/PureScript/CST/Lexer.purs @@ -293,9 +293,9 @@ bumpToken pos@{ line, column } = case _ of TokOperator qual sym -> { line, column: column + qualLength qual + String.length sym } TokSymbolName qual sym -> - { line, column: column + qualLength qual + String.length sym } + { line, column: column + qualLength qual + String.length sym + 2 } TokSymbolArrow Unicode -> - { line, column: column + 1 } + { line, column: column + 3 } TokSymbolArrow ASCII -> { line, column: column + 4 } TokHole hole ->