diff options
| -rw-r--r-- | relabel.lua | 4 | ||||
| -rw-r--r-- | testrelabelparser.lua | 14 |
2 files changed, 7 insertions, 11 deletions
diff --git a/relabel.lua b/relabel.lua index 9fc4b01..cda24d0 100644 --- a/relabel.lua +++ b/relabel.lua | |||
| @@ -322,7 +322,9 @@ local exp = m.P{ "Exp", | |||
| 322 | labels["MisTerm1"], labels["MisTerm2"]) | 322 | labels["MisTerm1"], labels["MisTerm2"]) |
| 323 | + m.Lc(Class, pointAtStart, labels["MisClose8"]) | 323 | + m.Lc(Class, pointAtStart, labels["MisClose8"]) |
| 324 | + defined | 324 | + defined |
| 325 | + "%" * expect(m.V"Labels", "ExpNameOrLab") / mm.T | 325 | + "%" * expect(m.P"{", "ExpNameOrLab") |
| 326 | * expect(S * m.V"Label", "ExpLab1") | ||
| 327 | * expect(S * "}", "MisClose7") / mm.T | ||
| 326 | + "{:" * (name * ":" + m.Cc(nil)) * expect(m.V"Exp", "ExpPatt5") | 328 | + "{:" * (name * ":" + m.Cc(nil)) * expect(m.V"Exp", "ExpPatt5") |
| 327 | * expect(S * ":}", "MisClose2") | 329 | * expect(S * ":}", "MisClose2") |
| 328 | / function (n, p) return mm.Cg(p, n) end | 330 | / function (n, p) return mm.Cg(p, n) end |
diff --git a/testrelabelparser.lua b/testrelabelparser.lua index 1c5bb9f..af13baf 100644 --- a/testrelabelparser.lua +++ b/testrelabelparser.lua | |||
| @@ -374,12 +374,6 @@ L1:C13: expected a label after the comma | |||
| 374 | ^ | 374 | ^ |
| 375 | ]]) | 375 | ]]) |
| 376 | 376 | ||
| 377 | testerror([[%{ a,,b,,c }]], [[ | ||
| 378 | L1:C6: expected a label after the comma | ||
| 379 | %{ a,,b,,c } | ||
| 380 | ^ | ||
| 381 | ]]) | ||
| 382 | |||
| 383 | -- testing ExpNameOrLab | 377 | -- testing ExpNameOrLab |
| 384 | 378 | ||
| 385 | testerror([[% s]], [[ | 379 | testerror([[% s]], [[ |
| @@ -477,9 +471,9 @@ L1:C8: missing closing '>' | |||
| 477 | -- testing MisClose7 | 471 | -- testing MisClose7 |
| 478 | 472 | ||
| 479 | testerror([['{' %{ a, b '}']], [[ | 473 | testerror([['{' %{ a, b '}']], [[ |
| 480 | L1:C12: missing closing '}' | 474 | L1:C9: missing closing '}' |
| 481 | '{' %{ a, b '}' | 475 | '{' %{ a, b '}' |
| 482 | ^ | 476 | ^ |
| 483 | ]]) | 477 | ]]) |
| 484 | 478 | ||
| 485 | -- testing MisClose8 | 479 | -- testing MisClose8 |
| @@ -647,9 +641,9 @@ L1:C14: expected at least one label after '{' | |||
| 647 | L1:C26: expected a pattern after '!' | 641 | L1:C26: expected a pattern after '!' |
| 648 | A <- 'A' /{'lab'} B / ! | 642 | A <- 'A' /{'lab'} B / ! |
| 649 | ^ | 643 | ^ |
| 650 | L3:C15: missing closing '}' | 644 | L3:C11: missing closing '}' |
| 651 | B <- %{1, 2 3} 'b' / '6' & / 'B' | 645 | B <- %{1, 2 3} 'b' / '6' & / 'B' |
| 652 | ^ | 646 | ^ |
| 653 | L3:C29: expected a pattern after '&' | 647 | L3:C29: expected a pattern after '&' |
| 654 | B <- %{1, 2 3} 'b' / '6' & / 'B' | 648 | B <- %{1, 2 3} 'b' / '6' & / 'B' |
| 655 | ^ | 649 | ^ |
