File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ # Issue #3170 : Enforce priority 1199 limit in curly braces
2+
3+ ## Test that priority 1200 operator in curly braces throws syntax error
4+
5+ ``` trycmd
6+ $ scryer-prolog -f --no-add-history
7+ ?- use_module(library(charsio)).
8+ true.
9+ ?- op(1200,xfx,~>).
10+ true.
11+ ?- read_from_chars("{a~>b}.",T).
12+ error(syntax_error(incomplete_reduction),read_term_from_chars/3:0).
13+ ?- halt.
14+ ```
15+
16+ ## Test that priority 1199 operator in curly braces works
17+
18+ ``` trycmd
19+ $ scryer-prolog -f --no-add-history
20+ ?- use_module(library(charsio)).
21+ true.
22+ ?- op(1199,xfx,~>).
23+ true.
24+ ?- read_from_chars("{a~>b}.",T).
25+ T = {a~>b}.
26+ ?- halt.
27+ ```
28+
29+ ## Test that parenthesized priority 1200 operator in curly braces works
30+
31+ ``` trycmd
32+ $ scryer-prolog -f --no-add-history
33+ ?- use_module(library(charsio)).
34+ true.
35+ ?- op(1200,xfx,~>).
36+ true.
37+ ?- read_from_chars("{(a~>b)}.",T).
38+ T = {a~>b}.
39+ ?- halt.
40+ ```
You can’t perform that action at this time.
0 commit comments