summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-10-20 01:19:49 +0200
committerGitHub <noreply@github.com>2020-10-20 01:19:49 +0200
commitf20e485827df6df97b8396558b10d7c59ca1b7dc (patch)
tree29ec160039b666c96d11a91698cdf51c5543adac /compiler
parent0f4b1ed270a0f0c380122723474ec0d36c1a7e00 (diff)
downloadNim-f20e485827df6df97b8396558b10d7c59ca1b7dc.tar.gz
Fix commentOffsetA for doc comments (#15643)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/lexer.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim
index 9b1dc642d..c15ecddfc 100644
--- a/compiler/lexer.nim
+++ b/compiler/lexer.nim
@@ -1042,7 +1042,7 @@ proc scanComment(L: var Lexer, tok: var Token) =
   tok.iNumber = 0
   assert L.buf[pos+1] == '#'
   when defined(nimpretty):
-    tok.commentOffsetA = L.offsetBase + pos - 1
+    tok.commentOffsetA = L.offsetBase + pos
 
   if L.buf[pos+2] == '[':
     skipMultiLineComment(L, tok, pos+3, true)