feat(ingest): treat backtick-quoted names as one name in the slice scan
draft feat/name-resolution-v2
feat(ingest): treat backtick-quoted names as one name in the slice scan Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| Changeset | 23ed775eff094307d084894fde3ce95308905cac |
|---|---|
| Author (claimed) | Timo Stolz <timo.stolz@gmail.com>, |
| Parents | 479c1b5e8387 |
| Children | |
| Pushlog | by timo via ssh |
modified tools/ingest_tck.py +5 −0
| @@ -350,6 +350,11 @@ | ||
| 350 | 350 | # operators or brackets. Temporal `@"…"` literals are in scope now (ADR-18); |
| 351 | 351 | # blanking the quoted part leaves a lone `@`, which the scans below ignore. |
| 352 | 352 | s = re.sub(r'"[^"]*"', " ", expression) |
| 353 | + # Backtick-quoted names (`a-b`, `Profit and loss` — the feel-scala extension, | |
| 354 | + # ADR-48) are one name each: a bound input name is blanked; any other quoted | |
| 355 | + # name becomes a single placeholder identifier, so it is judged like a plain | |
| 356 | + # name (free unless it is a member, loop variable or context key). | |
| 357 | + s = re.sub(r"`([^`]+)`", lambda m: " " if m.group(1) in input_names else " quotedname ", s) | |
| 353 | 358 | |
| 354 | 359 | # `instance of` type predicate (DMN §10.3.2.9). The right operand is a restricted |
| 355 | 360 | # type expression, not a general expression, so validate it on its own and then |