pragmagic / vscode-nim

An extension for VS Code which provides support for the Nim language.
Other
237 stars 37 forks source link

'\n' not considered as legal #99

Closed ghost closed 5 years ago

ghost commented 5 years ago

In the following code

import strutils
const c = '\n'
doAssert c in Whitespace
doAssert '\l' == c

The \n is marked wrongly in an error color like GitHub does too.

kosz78 commented 5 years ago

This error returns by nim compiler, I guess You need to ask this question in https://github.com/nim-lang/Nim

ghost commented 5 years ago

Ok, I just meant the red color inside vscode for new line char. For const c = '\t' it works. Does the information about the color comes from nimsuggest?

I thought it could be changed like this: https://github.com/pragmagic/vscode-nim/pull/75

GULPF commented 5 years ago

@tim-st is right, this is an error in the syntax definition. I've sent out a PR: #101