Commit 42a261f
committed
Scope a block scalar in explicit-key position as the key name
A block scalar can be a mapping key (`? |` / `? >`) — and since an implicit key
must be single-line, a multi-line block-scalar key is ALWAYS `?`-introduced.
Monogram already scopes every other scalar key (plain, double- and single-quoted)
as entity.name.tag, but a block-scalar key fell to the §2a value region and was
scoped string.unquoted.block — an inconsistency in its own model (a block scalar
is a scalar; a scalar in key position is the key name).
Emit a key-flavoured block-scalar region gated on the explicit-key indicator +
block introducer (same begin/end machinery as §2a, body scoped with the key
scope), ranked with #explicit-key so its `?`-anchored begin beats the bare `?`
punctuation token and the value-position block scalar. A block scalar in VALUE
position (`: |`) has no leading `?`, so it is untouched. Derived from the already
-detected explicit-key + block-scalar shapes; gated to YAML.
YAML scope-gap 99.75% -> 99.92% (tag.name 436->438); the two fixed tokens are
ones the official grammar gets wrong (it emits keyword.control.flow.block-scalar),
so Monogram now leads on them. Only the DWX9 leading-blank-indent edge remains.
Refs #121 parent ead6a3d commit 42a261f
2 files changed
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4658 | 4658 | | |
4659 | 4659 | | |
4660 | 4660 | | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
| 4676 | + | |
| 4677 | + | |
| 4678 | + | |
| 4679 | + | |
| 4680 | + | |
| 4681 | + | |
| 4682 | + | |
| 4683 | + | |
| 4684 | + | |
| 4685 | + | |
| 4686 | + | |
| 4687 | + | |
4661 | 4688 | | |
4662 | 4689 | | |
4663 | 4690 | | |
| |||
7096 | 7123 | | |
7097 | 7124 | | |
7098 | 7125 | | |
| 7126 | + | |
| 7127 | + | |
| 7128 | + | |
| 7129 | + | |
| 7130 | + | |
7099 | 7131 | | |
7100 | 7132 | | |
7101 | 7133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
225 | 254 | | |
226 | 255 | | |
227 | 256 | | |
| |||
0 commit comments