Skip to content

Commit 4d6c110

Browse files
authored
Merge pull request #233 from Gompyn/patch-6
Fix NL rule to handle multiline comments correctly
2 parents 37a9f69 + 52d0e5d commit 4d6c110

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

syncode/parsers/grammars/go.lark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ nls: NL+
301301
NAME : /[a-zA-Z_]\w*/
302302

303303
COMMENT : /\/\/[^\n]*\n/
304-
NL: COMMENT | /(\r?\n[\t ]*)+/ | /\/\*[^\n]*\n(\*+[^*\/]|[^*])*\*+\//s
304+
NL: COMMENT | /(\r?\n[\t ]*)+/ | /\/\*(\*+[^*\/\n]|[^*\n])*\**\n(\*+[^*\/]|[^*])*\*+\//s
305305

306306
// %import common.WS_INLINE
307307
// %ignore WS_INLINE

0 commit comments

Comments
 (0)