Bjolang's raw strings are strings

Bjolang reads """...""" as a raw string: three or more quotes open it, the
same number close it, and nothing in it is an escape. The grammar has a
string.quoted.triple.bjolang scope for it, so quotes inside one stay inside,
and one over several lines is a string on every line. tests/demo.bjo checks
both, and passes.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5)

Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
Linus Björnstam 2026-10-01 09:32:18 +02:00
parent c499691376
commit 6bb44bc05f
2 changed files with 30 additions and 0 deletions

View file

@ -26,6 +26,9 @@
{
"include": "#interpolated-string"
},
{
"include": "#raw-string"
},
{
"include": "#string"
},
@ -107,6 +110,22 @@
}
]
},
"raw-string": {
"comment": "\"\"\"...\"\"\": three or more quotes open it, the same number close it, and nothing in it is an escape.",
"begin": "(\"{3,})",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.bjolang"
}
},
"end": "(?<!\")\\1(?!\")",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.bjolang"
}
},
"name": "string.quoted.triple.bjolang"
},
"string": {
"begin": "\"",
"beginCaptures": {