Commit 9322d19
committed
Fix spaced bar syntax in codes mode
The spaced bar syntax `| |` failed with syntax_error(incomplete_reduction)
when double_quotes flag was set to codes. The compact syntax `||` worked
fine in both modes.
Root cause: The spaced bar validation only accepted CompleteString and
PartialString terms, but in codes mode "abc" becomes Term::Cons([97,98,99]).
Fix: Add Term::Cons and empty list handling to spaced bar validation,
matching the compact || validation logic.
Also:
- Add discontiguous(test/2) directive to double_bar.pl (needed because
set_prolog_flag directives appear between test clauses)
- Add double_bar_tests.stdout for proper CLI test registration1 parent 49ec77c commit 9322d19
File tree
3 files changed
+6
-0
lines changed- src
- parser
- tests
- tests/scryer/cli/src_tests
3 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
1097 | 1099 | | |
1098 | 1100 | | |
1099 | 1101 | | |
1100 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
1101 | 1105 | | |
1102 | 1106 | | |
1103 | 1107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments