fix(scripting): #1056 refuse a {{equip}} token in a verbatim/raw/interpolated path literal — editor diagnostic + deploy-gate refusal

This commit is contained in:
Joseph Doherty
2026-12-03 15:05:40 -05:00
parent 16c8b7ffad
commit e840ec1fbc
6 changed files with 211 additions and 2 deletions
+6 -2
View File
@@ -527,8 +527,12 @@ hold `\`, `"`, braces, line breaks or non-ASCII text (`RawPaths.ValidateSegment`
A `<RefName>` with a malformed escape (`\e`) is left as written for the compiler to report. Only
regular `"…"` literals are path literals: a `{{equip}}/…` token inside a verbatim (`@"…"`),
interpolated (`$"…"`) or raw (`"""…"""`) literal is **not substituted** (and not checked) — keep the
token in a regular literal.
interpolated (`$"…"`) or raw (`"""…"""`) literal is **not substituted**, so since #1056 it is refused
instead of silently reading Bad at runtime: the editor flags it (`OTSCRIPT_EQUIPLITERAL`, an error) and
the deploy gate fails the script (`equip token not substituted — …`), both through
`EquipTokenLiteralScanner`. Keep the token in a regular literal. (Only a `ctx.GetTag` /
`ctx.SetVirtualTag` path argument is scanned; a `{{equip}}` token in a Calculation script is not
substituted in any literal form — the seam does no substitution.)
---