VirtusLab / using_directives

12 stars 8 forks source link

improvement: allow values without quotes #46

Closed tgodzik closed 1 year ago

tgodzik commented 1 year ago

Previously, string values would always require quotes since that coresponded to actual scala syntax. Now, we no longer allow using directives in normal Scala code, so we can allow values without quotes. Whenever there is a more complex value like one that requires a space, we would still require them.

Related to https://github.com/VirtusLab/scala-cli/issues/1954

Additionally the values are not treated literally and can contain any special characters since we are not limited by Scala syntax.

I also changed to only allow single line, which simplified tests a bit as they were taking into account newlines in a lot of places.