erlang-ls / grammar

TextMate grammar (also used by VS Code) for the Erlang programming language
Apache License 2.0
6 stars 8 forks source link

Add sigils as per Erlang/OTP 27 #14

Closed KornelH closed 6 months ago

KornelH commented 7 months ago

Erlang/OTP 27 [1] introduces sigils (type prefix for string literals) [2].

[1] https://www.erlang.org/news/168 [2] https://www.erlang.org/docs/27/system/data_types.html#sigil

robertoaloi commented 7 months ago

@KornelH There's a CI failure on this one.

KornelH commented 7 months ago

As the test file contains a triple-quoted string without sigil prefix, it requires the the docstring pull request #13 and I didn't want to remove the docstring from the example just to add back later when the docstring pull request is merged. So I just waited for that pull request be merged first and now, this pull request is updated.

KornelH commented 7 months ago

@robertoaloi, I did some updates on the grammar besides of adding the sigils. I learned that, in end patterns we can refer to capture groups of begin patterns therefore triple-quoted strings (docstring) and triple-quoted sigils (sigil-docstring) are now have only one definition that accepts any number (3+) of double quotes as begin and end caracter sequences.

robertoaloi commented 6 months ago

Thanks!