mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-07 14:44:59 +00:00
Migrate old test_syntax snapshots (pass/fail/malformed) to new format (#7910)
* migrate old test_syntax snapshots (pass/fail/malformed) to new format * ignore snapshots for `typos` CI check
This commit is contained in:
parent
5ffba6129b
commit
d16ceac894
570 changed files with 24600 additions and 5 deletions
37
src/snapshots/old_syntax/ability_demand_value_has_args.md
Normal file
37
src/snapshots/old_syntax/ability_demand_value_has_args.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ability_demand_value_has_args fail
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
MEq implements
|
||||
eq b c : a, a -> U64 where a implements MEq
|
||||
|
||||
1
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:4),KwImplements(1:5-1:15),Newline(1:1-1:1),
|
||||
LowerIdent(2:5-2:7),LowerIdent(2:8-2:9),LowerIdent(2:10-2:11),OpColon(2:12-2:13),LowerIdent(2:14-2:15),Comma(2:15-2:16),LowerIdent(2:17-2:18),OpArrow(2:19-2:21),UpperIdent(2:22-2:25),KwWhere(2:26-2:31),LowerIdent(2:32-2:33),KwImplements(2:34-2:44),UpperIdent(2:45-2:48),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
Int(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.4 (raw "MEq"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
MEq
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.4 (ext-var 73) (name "MEq") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[MEq]*"))
|
||||
~~~
|
|
@ -0,0 +1,39 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ability_demands_not_indented_with_first fail
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
MEq implements
|
||||
eq : a, a -> U64 where a implements MEq
|
||||
neq : a, a -> U64 where a implements MEq
|
||||
|
||||
1
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:4),KwImplements(1:5-1:15),Newline(1:1-1:1),
|
||||
LowerIdent(2:5-2:7),OpColon(2:8-2:9),LowerIdent(2:10-2:11),Comma(2:11-2:12),LowerIdent(2:13-2:14),OpArrow(2:15-2:17),UpperIdent(2:18-2:21),KwWhere(2:22-2:27),LowerIdent(2:28-2:29),KwImplements(2:30-2:40),UpperIdent(2:41-2:44),Newline(1:1-1:1),
|
||||
LowerIdent(3:9-3:12),OpColon(3:13-3:14),LowerIdent(3:15-3:16),Comma(3:16-3:17),LowerIdent(3:18-3:19),OpArrow(3:20-3:22),UpperIdent(3:23-3:26),KwWhere(3:27-3:32),LowerIdent(3:33-3:34),KwImplements(3:35-3:45),UpperIdent(3:46-3:49),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
Int(5:1-5:2),EndOfFile(5:2-5:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.4 (raw "MEq"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
MEq
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.4 (ext-var 73) (name "MEq") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[MEq]*"))
|
||||
~~~
|
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ability_first_demand_not_indented_enough fail
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
MEq implements
|
||||
eq : a, a -> U64 where a implements MEq
|
||||
|
||||
1
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:4),KwImplements(1:5-1:15),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:3),OpColon(2:4-2:5),LowerIdent(2:6-2:7),Comma(2:7-2:8),LowerIdent(2:9-2:10),OpArrow(2:11-2:13),UpperIdent(2:14-2:17),KwWhere(2:18-2:23),LowerIdent(2:24-2:25),KwImplements(2:26-2:36),UpperIdent(2:37-2:40),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
Int(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.4 (raw "MEq"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
MEq
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.4 (ext-var 73) (name "MEq") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[MEq]*"))
|
||||
~~~
|
37
src/snapshots/old_syntax/ability_non_signature_expression.md
Normal file
37
src/snapshots/old_syntax/ability_non_signature_expression.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ability_non_signature_expression fail
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
MEq implements
|
||||
123
|
||||
|
||||
1
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:4),KwImplements(1:5-1:15),Newline(1:1-1:1),
|
||||
Int(2:5-2:8),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
Int(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.4 (raw "MEq"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
MEq
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.4 (ext-var 73) (name "MEq") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[MEq]*"))
|
||||
~~~
|
38
src/snapshots/old_syntax/add_var_with_spaces.md
Normal file
38
src/snapshots/old_syntax/add_var_with_spaces.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=add_var_with_spaces
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
x + 2
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `x` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpPlus(1:3-1:4),Int(1:5-1:6),EndOfFile(1:6-1:6),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-1.6 (op "+")
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "x"))
|
||||
(e-int @1.5-1.6 (raw "2")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
NO CHANGE
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-1.6 (op "add") (id 76)
|
||||
(e-runtime-error (tag "ident_not_in_scope"))
|
||||
(e-int @1.5-1.6 (value "2")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 76) (type "*"))
|
||||
~~~
|
35
src/snapshots/old_syntax/add_with_spaces.md
Normal file
35
src/snapshots/old_syntax/add_with_spaces.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=add_with_spaces
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
1 + 2
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpPlus(1:4-1:5),Int(1:8-1:9),EndOfFile(1:9-1:9),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-1.9 (op "+")
|
||||
(e-int @1.1-1.2 (raw "1"))
|
||||
(e-int @1.8-1.9 (raw "2")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
1 + 2
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-1.9 (op "add") (id 75)
|
||||
(e-int @1.1-1.2 (value "1"))
|
||||
(e-int @1.8-1.9 (value "2")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 75) (type "*"))
|
||||
~~~
|
35
src/snapshots/old_syntax/alias_ann_in_parens.md
Normal file
35
src/snapshots/old_syntax/alias_ann_in_parens.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=alias_ann_in_parens
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
M:(
|
||||
r)
|
||||
h
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:2),CloseRound(2:2-2:3),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "M"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
M
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "M") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[M]*"))
|
||||
~~~
|
35
src/snapshots/old_syntax/alias_comment_after_head.md
Normal file
35
src/snapshots/old_syntax/alias_comment_after_head.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=alias_comment_after_head
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
A#
|
||||
p:e
|
||||
A
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),Newline(1:3-1:3),
|
||||
LowerIdent(2:2-2:3),OpColon(2:3-2:4),LowerIdent(2:4-2:5),Newline(1:1-1:1),
|
||||
UpperIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "A"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
A
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "A") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[A]*"))
|
||||
~~~
|
58
src/snapshots/old_syntax/alias_or_opaque_fail.md
Normal file
58
src/snapshots/old_syntax/alias_or_opaque_fail.md
Normal file
|
@ -0,0 +1,58 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=alias_or_opaque_fail fail
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
(@,B
|
||||
.e:
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **@,** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**alias_or_opaque_fail.md:1:2:1:4:**
|
||||
```roc
|
||||
(@,B
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
**PARSE ERROR**
|
||||
A parsing error occurred: `expected_expr_close_round_or_comma`
|
||||
This is an unexpected parsing error. Please check your syntax.
|
||||
|
||||
Here is the problematic code:
|
||||
**alias_or_opaque_fail.md:2:4:2:4:**
|
||||
```roc
|
||||
.e:
|
||||
```
|
||||
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenRound(1:1-1:2),MalformedOpaqueNameWithoutName(1:2-1:3),Comma(1:3-1:4),UpperIdent(1:4-1:5),Newline(1:1-1:1),
|
||||
DotLowerIdent(2:1-2:3),OpColon(2:3-2:4),EndOfFile(2:4-2:4),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @2.4-2.4 (reason "expected_expr_close_round_or_comma"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
35
src/snapshots/old_syntax/alias_parens_comment.md
Normal file
35
src/snapshots/old_syntax/alias_parens_comment.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=alias_parens_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
K:(#
|
||||
s)
|
||||
K
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:5-1:5),
|
||||
LowerIdent(2:1-2:2),CloseRound(2:2-2:3),Newline(1:1-1:1),
|
||||
UpperIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "K"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
K
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "K") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[K]*"))
|
||||
~~~
|
37
src/snapshots/old_syntax/alias_parens_comment_indent.md
Normal file
37
src/snapshots/old_syntax/alias_parens_comment_indent.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=alias_parens_comment_indent
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
O:O(z
|
||||
#
|
||||
)
|
||||
b#
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),NoSpaceOpenRound(1:4-1:5),LowerIdent(1:5-1:6),Newline(1:1-1:1),
|
||||
Newline(2:2-2:2),
|
||||
CloseRound(3:1-3:2),Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:3-4:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "O"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
O
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "O") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[O]*"))
|
||||
~~~
|
38
src/snapshots/old_syntax/all_the_bangs.md
Normal file
38
src/snapshots/old_syntax/all_the_bangs.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=all_the_bangs fail
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
p
|
||||
!
|
||||
.p!!
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `p` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),Newline(1:1-1:1),
|
||||
OpBang(2:1-2:2),Newline(1:1-1:1),
|
||||
DotLowerIdent(3:1-3:5),EndOfFile(3:5-3:5),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "p"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
p
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
37
src/snapshots/old_syntax/ann_apply_record_with_newlines.md
Normal file
37
src/snapshots/old_syntax/ann_apply_record_with_newlines.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_apply_record_with_newlines
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
8:O
|
||||
{
|
||||
}
|
||||
Q
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),Newline(1:1-1:1),
|
||||
OpenCurly(2:2-2:3),Newline(1:1-1:1),
|
||||
CloseCurly(3:1-3:2),Newline(1:1-1:1),
|
||||
UpperIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (raw "8"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
8
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (value "8") (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "Num(*)"))
|
||||
~~~
|
99
src/snapshots/old_syntax/ann_closed_union.md
Normal file
99
src/snapshots/old_syntax/ann_closed_union.md
Normal file
|
@ -0,0 +1,99 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_closed_union
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
{
|
||||
foo : [True, Perhaps Thing]
|
||||
foo = True
|
||||
|
||||
42
|
||||
}
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**PARSE ERROR**
|
||||
A parsing error occurred: `expected_ty_close_square_or_comma`
|
||||
This is an unexpected parsing error. Please check your syntax.
|
||||
|
||||
Here is the problematic code:
|
||||
**ann_closed_union.md:2:26:2:32:**
|
||||
```roc
|
||||
foo : [True, Perhaps Thing]
|
||||
```
|
||||
^^^^^^
|
||||
|
||||
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**ann_closed_union.md:2:31:2:31:**
|
||||
```roc
|
||||
foo : [True, Perhaps Thing]
|
||||
```
|
||||
|
||||
|
||||
|
||||
**MALFORMED TYPE**
|
||||
This type annotation is malformed or contains invalid syntax.
|
||||
|
||||
**UNUSED VARIABLE**
|
||||
Variable ``foo`` is not used anywhere in your code.
|
||||
|
||||
If you don't need this variable, prefix it with an underscore like `_foo` to suppress this warning.
|
||||
The unused variable is declared here:
|
||||
**ann_closed_union.md:3:5:3:8:**
|
||||
```roc
|
||||
foo = True
|
||||
```
|
||||
^^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenCurly(1:1-1:2),Newline(1:1-1:1),
|
||||
LowerIdent(2:5-2:8),OpColon(2:9-2:10),OpenSquare(2:11-2:12),UpperIdent(2:12-2:16),Comma(2:16-2:17),UpperIdent(2:18-2:25),UpperIdent(2:26-2:31),CloseSquare(2:31-2:32),Newline(1:1-1:1),
|
||||
LowerIdent(3:5-3:8),OpAssign(3:9-3:10),UpperIdent(3:11-3:15),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
Int(5:5-5:7),Newline(1:1-1:1),
|
||||
CloseCurly(6:1-6:2),EndOfFile(6:2-6:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-block @1.1-6.2
|
||||
(statements
|
||||
(s-type-anno @2.5-2.32 (name "foo")
|
||||
(ty-malformed @2.26-2.32 (tag "expected_ty_close_square_or_comma")))
|
||||
(e-malformed @1.1-1.1 (reason "expr_unexpected_token"))
|
||||
(s-decl @3.5-3.15
|
||||
(p-ident @3.5-3.8 (raw "foo"))
|
||||
(e-tag @3.11-3.15 (raw "True")))
|
||||
(e-int @5.5-5.7 (raw "42"))))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
{
|
||||
foo :
|
||||
|
||||
foo = True
|
||||
|
||||
42
|
||||
}
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-block @1.1-6.2 (id 82)
|
||||
(s-type-anno @2.5-2.32 (name "foo")
|
||||
(ty-malformed @2.26-2.32))
|
||||
(s-let @3.5-3.15
|
||||
(p-assign @3.5-3.8 (ident "foo") (id 77))
|
||||
(e-tag @3.11-3.15 (ext-var 78) (name "True") (args "TODO") (id 79)))
|
||||
(e-int @5.5-5.7 (value "42")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 82) (type "Num(*)"))
|
||||
~~~
|
93
src/snapshots/old_syntax/ann_effectful_fn.md
Normal file
93
src/snapshots/old_syntax/ann_effectful_fn.md
Normal file
|
@ -0,0 +1,93 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_effectful_fn
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
{
|
||||
launchTheNukes : {} => Result Bool LaunchNukeErr
|
||||
launchTheNukes = |{}| {
|
||||
crash "todo"
|
||||
}
|
||||
launchTheNukes({})
|
||||
}
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**NOT IMPLEMENTED**
|
||||
This feature is not yet implemented: crash statement
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenCurly(1:1-1:2),Newline(1:1-1:1),
|
||||
LowerIdent(2:5-2:19),OpColon(2:20-2:21),OpenCurly(2:22-2:23),CloseCurly(2:23-2:24),OpFatArrow(2:25-2:27),UpperIdent(2:28-2:34),UpperIdent(2:35-2:39),UpperIdent(2:40-2:53),Newline(1:1-1:1),
|
||||
LowerIdent(3:5-3:19),OpAssign(3:20-3:21),OpBar(3:22-3:23),OpenCurly(3:23-3:24),CloseCurly(3:24-3:25),OpBar(3:25-3:26),OpenCurly(3:27-3:28),Newline(1:1-1:1),
|
||||
KwCrash(4:9-4:14),StringStart(4:15-4:16),StringPart(4:16-4:20),StringEnd(4:20-4:21),Newline(1:1-1:1),
|
||||
CloseCurly(5:5-5:6),Newline(1:1-1:1),
|
||||
LowerIdent(6:5-6:19),NoSpaceOpenRound(6:19-6:20),OpenCurly(6:20-6:21),CloseCurly(6:21-6:22),CloseRound(6:22-6:23),Newline(1:1-1:1),
|
||||
CloseCurly(7:1-7:2),EndOfFile(7:2-7:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-block @1.1-7.2
|
||||
(statements
|
||||
(s-type-anno @2.5-2.39 (name "launchTheNukes")
|
||||
(ty-fn @2.22-2.34
|
||||
(ty-record @2.22-2.24)
|
||||
(ty (name "Result"))))
|
||||
(e-tag @2.35-2.39 (raw "Bool"))
|
||||
(e-tag @2.40-2.53 (raw "LaunchNukeErr"))
|
||||
(s-decl @3.5-5.6
|
||||
(p-ident @3.5-3.19 (raw "launchTheNukes"))
|
||||
(e-lambda @3.22-5.6
|
||||
(args
|
||||
(p-record @3.23-3.25))
|
||||
(e-block @3.27-5.6
|
||||
(statements
|
||||
(s-crash @1.1-1.1
|
||||
(e-string @4.15-4.21
|
||||
(e-string-part @4.16-4.20 (raw "todo"))))))))
|
||||
(e-apply @6.5-6.23
|
||||
(e-ident @6.5-6.19 (qaul "") (raw "launchTheNukes"))
|
||||
(e-record @6.20-6.22))))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
{
|
||||
launchTheNukes : {} => Result
|
||||
Bool
|
||||
LaunchNukeErr
|
||||
launchTheNukes = |{}| {
|
||||
crash "todo"
|
||||
}
|
||||
launchTheNukes({})
|
||||
}
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-block @1.1-7.2 (id 96)
|
||||
(s-type-anno @2.5-2.39 (name "launchTheNukes")
|
||||
(ty-fn @2.22-2.34 (effectful true)
|
||||
(ty-record @2.22-2.24)
|
||||
(ty @2.28-2.34 (name "Result"))))
|
||||
(s-expr @2.35-2.53
|
||||
(e-tag @2.35-2.39 (ext-var 78) (name "Bool") (args "TODO")))
|
||||
(s-expr @2.40-3.19
|
||||
(e-tag @2.40-2.53 (ext-var 81) (name "LaunchNukeErr") (args "TODO")))
|
||||
(s-let @3.5-5.6
|
||||
(p-assign @3.5-3.19 (ident "launchTheNukes") (id 84))
|
||||
(e-lambda @3.22-5.6 (id 90)
|
||||
(args
|
||||
(p-record-destructure @3.23-3.25 (id 85)
|
||||
(destructs)))
|
||||
(e-block @3.27-5.6
|
||||
(e-runtime-error (tag "not_implemented")))))
|
||||
(e-call @6.5-6.23
|
||||
(e-lookup-local @6.5-6.19
|
||||
(pattern (id 84)))
|
||||
(e-empty_record @6.20-6.22)))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 96) (type "*"))
|
||||
~~~
|
39
src/snapshots/old_syntax/ann_extra_indented_implements.md
Normal file
39
src/snapshots/old_syntax/ann_extra_indented_implements.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_extra_indented_implements
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
2 :
|
||||
r where e
|
||||
implements
|
||||
P
|
||||
u
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpColon(1:3-1:4),Newline(1:1-1:1),
|
||||
LowerIdent(2:5-2:6),KwWhere(2:7-2:12),LowerIdent(2:13-2:14),Newline(1:1-1:1),
|
||||
KwImplements(3:5-3:15),Newline(1:1-1:1),
|
||||
UpperIdent(4:5-4:6),Newline(1:1-1:1),
|
||||
LowerIdent(5:1-5:2),EndOfFile(5:2-5:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (raw "2"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
2
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (value "2") (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "Num(*)"))
|
||||
~~~
|
44
src/snapshots/old_syntax/ann_parens_comments.md
Normal file
44
src/snapshots/old_syntax/ann_parens_comments.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_parens_comments
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
r:(
|
||||
r
|
||||
#
|
||||
#
|
||||
)
|
||||
h
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `r` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:2),Newline(1:1-1:1),
|
||||
Newline(3:2-3:2),
|
||||
Newline(4:2-4:2),
|
||||
CloseRound(5:1-5:2),Newline(1:1-1:1),
|
||||
LowerIdent(6:1-6:2),EndOfFile(6:2-6:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "r"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
r
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
42
src/snapshots/old_syntax/ann_parens_where_implements_func.md
Normal file
42
src/snapshots/old_syntax/ann_parens_where_implements_func.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_parens_where_implements_func
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
x:(a
|
||||
where
|
||||
e
|
||||
implements K->Z)
|
||||
s
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `x` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),LowerIdent(1:4-1:5),Newline(1:1-1:1),
|
||||
KwWhere(2:1-2:6),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),Newline(1:1-1:1),
|
||||
KwImplements(4:1-4:11),UpperIdent(4:12-4:13),OpArrow(4:13-4:15),UpperIdent(4:15-4:16),CloseRound(4:16-4:17),Newline(1:1-1:1),
|
||||
LowerIdent(5:1-5:2),EndOfFile(5:2-5:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "x"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
x
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
37
src/snapshots/old_syntax/ann_pattern_comment_before_body.md
Normal file
37
src/snapshots/old_syntax/ann_pattern_comment_before_body.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_pattern_comment_before_body
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
H:p
|
||||
(#
|
||||
s)=p
|
||||
d#
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),OpColon(1:2-1:3),LowerIdent(1:3-1:4),Newline(1:1-1:1),
|
||||
OpenRound(2:1-2:2),Newline(2:3-2:3),
|
||||
LowerIdent(3:1-3:2),CloseRound(3:2-3:3),OpAssign(3:3-3:4),LowerIdent(3:4-3:5),Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:3-4:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "H"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
H
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "H") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[H]*"))
|
||||
~~~
|
45
src/snapshots/old_syntax/ann_record_pat_with_comment.md
Normal file
45
src/snapshots/old_syntax/ann_record_pat_with_comment.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_record_pat_with_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
{l#
|
||||
:s}:s
|
||||
o
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `s` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenCurly(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:4-1:4),
|
||||
OpColon(2:1-2:2),LowerIdent(2:2-2:3),CloseCurly(2:3-2:4),OpColon(2:4-2:5),LowerIdent(2:5-2:6),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-record @1.1-2.4
|
||||
(field (field "l") (optional false)
|
||||
(e-ident @2.2-2.3 (qaul "") (raw "s"))))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
{
|
||||
l: s,
|
||||
}
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-record @1.1-2.4 (ext-var 76) (id 77)
|
||||
(fields
|
||||
(field (name "l")
|
||||
(e-runtime-error (tag "ident_not_in_scope")))))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 77) (type "{ l: Error }"))
|
||||
~~~
|
40
src/snapshots/old_syntax/ann_tag_union_newline_comment.md
Normal file
40
src/snapshots/old_syntax/ann_tag_union_newline_comment.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_tag_union_newline_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
k:
|
||||
[T,
|
||||
]m#
|
||||
D
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `k` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),Newline(1:1-1:1),
|
||||
OpenSquare(2:1-2:2),UpperIdent(2:2-2:3),Comma(2:3-2:4),Newline(1:1-1:1),
|
||||
CloseSquare(3:1-3:2),LowerIdent(3:2-3:3),Newline(3:4-3:4),
|
||||
UpperIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "k"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
k
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
37
src/snapshots/old_syntax/ann_where_e_newline_implements.md
Normal file
37
src/snapshots/old_syntax/ann_where_e_newline_implements.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=ann_where_e_newline_implements
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
J:[
|
||||
]where e
|
||||
implements T
|
||||
i
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),OpColon(1:2-1:3),OpenSquare(1:3-1:4),Newline(1:1-1:1),
|
||||
CloseSquare(2:1-2:2),KwWhere(2:2-2:7),LowerIdent(2:8-2:9),Newline(1:1-1:1),
|
||||
KwImplements(3:3-3:13),UpperIdent(3:14-3:15),Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "J"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
J
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "J") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[J]*"))
|
||||
~~~
|
35
src/snapshots/old_syntax/annotate_tuple_func.md
Normal file
35
src/snapshots/old_syntax/annotate_tuple_func.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotate_tuple_func
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
1:(f
|
||||
,ww->p)e
|
||||
Mh
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),LowerIdent(1:4-1:5),Newline(1:1-1:1),
|
||||
Comma(2:1-2:2),LowerIdent(2:2-2:4),OpArrow(2:4-2:6),LowerIdent(2:6-2:7),CloseRound(2:7-2:8),LowerIdent(2:8-2:9),Newline(1:1-1:1),
|
||||
UpperIdent(3:1-3:3),EndOfFile(3:3-3:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (raw "1"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
1
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (value "1") (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "Num(*)"))
|
||||
~~~
|
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotated_empty_record_destructure
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
E:B
|
||||
{}=B
|
||||
B
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),Newline(1:1-1:1),
|
||||
OpenCurly(2:1-2:2),CloseCurly(2:2-2:3),OpAssign(2:3-2:4),UpperIdent(2:4-2:5),Newline(1:1-1:1),
|
||||
UpperIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "E"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
E
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "E") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[E]*"))
|
||||
~~~
|
51
src/snapshots/old_syntax/annotated_record_destructure.md
Normal file
51
src/snapshots/old_syntax/annotated_record_destructure.md
Normal file
|
@ -0,0 +1,51 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotated_record_destructure
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
{ x, y } : Foo
|
||||
{ x, y } = { x : "foo", y : 3.14 }
|
||||
|
||||
x
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `x` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `y` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenCurly(1:1-1:2),LowerIdent(1:3-1:4),Comma(1:4-1:5),LowerIdent(1:6-1:7),CloseCurly(1:8-1:9),OpColon(1:10-1:11),UpperIdent(1:12-1:15),Newline(1:1-1:1),
|
||||
OpenCurly(2:1-2:2),LowerIdent(2:3-2:4),Comma(2:4-2:5),LowerIdent(2:6-2:7),CloseCurly(2:8-2:9),OpAssign(2:10-2:11),OpenCurly(2:12-2:13),LowerIdent(2:14-2:15),OpColon(2:16-2:17),StringStart(2:18-2:19),StringPart(2:19-2:22),StringEnd(2:22-2:23),Comma(2:23-2:24),LowerIdent(2:25-2:26),OpColon(2:27-2:28),Float(2:29-2:33),CloseCurly(2:34-2:35),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-record @1.1-1.9
|
||||
(field (field "x") (optional false))
|
||||
(field (field "y") (optional false)))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
{ x, y }
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-record @1.1-1.9 (ext-var 79) (id 80)
|
||||
(fields
|
||||
(field (name "x")
|
||||
(e-runtime-error (tag "ident_not_in_scope")))
|
||||
(field (name "y")
|
||||
(e-runtime-error (tag "ident_not_in_scope")))))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 80) (type "{ x: Error, y: Error }"))
|
||||
~~~
|
37
src/snapshots/old_syntax/annotated_tag_destructure.md
Normal file
37
src/snapshots/old_syntax/annotated_tag_destructure.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotated_tag_destructure
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
UserId x : [ UserId I64 ]
|
||||
UserId x = UserId 42
|
||||
|
||||
x
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:7),LowerIdent(1:8-1:9),OpColon(1:10-1:11),OpenSquare(1:12-1:13),UpperIdent(1:14-1:20),UpperIdent(1:21-1:24),CloseSquare(1:25-1:26),Newline(1:1-1:1),
|
||||
UpperIdent(2:1-2:7),LowerIdent(2:8-2:9),OpAssign(2:10-2:11),UpperIdent(2:12-2:18),Int(2:19-2:21),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.7 (raw "UserId"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
UserId
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.7 (ext-var 73) (name "UserId") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[UserId]*"))
|
||||
~~~
|
49
src/snapshots/old_syntax/annotated_tuple_destructure.md
Normal file
49
src/snapshots/old_syntax/annotated_tuple_destructure.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotated_tuple_destructure
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
( x, y ) : Foo
|
||||
( x, y ) = ( "foo", 3.14 )
|
||||
|
||||
x
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `x` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `y` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenRound(1:1-1:2),LowerIdent(1:3-1:4),Comma(1:4-1:5),LowerIdent(1:6-1:7),CloseRound(1:8-1:9),OpColon(1:10-1:11),UpperIdent(1:12-1:15),Newline(1:1-1:1),
|
||||
OpenRound(2:1-2:2),LowerIdent(2:3-2:4),Comma(2:4-2:5),LowerIdent(2:6-2:7),CloseRound(2:8-2:9),OpAssign(2:10-2:11),OpenRound(2:12-2:13),StringStart(2:14-2:15),StringPart(2:15-2:18),StringEnd(2:18-2:19),Comma(2:19-2:20),Float(2:21-2:25),CloseRound(2:26-2:27),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tuple @1.1-1.9
|
||||
(e-ident @1.3-1.4 (qaul "") (raw "x"))
|
||||
(e-ident @1.6-1.7 (qaul "") (raw "y")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
(x, y)
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tuple @1.1-1.9 (id 77)
|
||||
(elems
|
||||
(e-runtime-error (tag "ident_not_in_scope"))
|
||||
(e-runtime-error (tag "ident_not_in_scope"))))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 77) (type "(Error, Error)"))
|
||||
~~~
|
37
src/snapshots/old_syntax/annotation_apply_newlines.md
Normal file
37
src/snapshots/old_syntax/annotation_apply_newlines.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_apply_newlines
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
A
|
||||
p:
|
||||
e
|
||||
A
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),Newline(1:1-1:1),
|
||||
LowerIdent(2:2-2:3),OpColon(2:3-2:4),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),Newline(1:1-1:1),
|
||||
UpperIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "A"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
A
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "A") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[A]*"))
|
||||
~~~
|
38
src/snapshots/old_syntax/annotation_comment_before_as.md
Normal file
38
src/snapshots/old_syntax/annotation_comment_before_as.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_comment_before_as
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
e:A#
|
||||
as H
|
||||
n
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `e` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),Newline(1:5-1:5),
|
||||
KwAs(2:3-2:5),UpperIdent(2:6-2:7),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "e"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
e
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
37
src/snapshots/old_syntax/annotation_comment_before_colon.md
Normal file
37
src/snapshots/old_syntax/annotation_comment_before_colon.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_comment_before_colon
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
A
|
||||
e#g
|
||||
:A
|
||||
AA
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),Newline(1:1-1:1),
|
||||
LowerIdent(2:2-2:3),Newline(2:4-2:5),
|
||||
OpColon(3:1-3:2),UpperIdent(3:2-3:3),Newline(1:1-1:1),
|
||||
UpperIdent(4:1-4:3),EndOfFile(4:3-4:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "A"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
A
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "A") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[A]*"))
|
||||
~~~
|
36
src/snapshots/old_syntax/annotation_double_as.md
Normal file
36
src/snapshots/old_syntax/annotation_double_as.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_double_as
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
s:(e as A)as A
|
||||
s
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `s` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),LowerIdent(1:4-1:5),KwAs(1:6-1:8),UpperIdent(1:9-1:10),CloseRound(1:10-1:11),KwAs(1:11-1:13),UpperIdent(1:14-1:15),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:2),EndOfFile(2:2-2:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "s"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
s
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
38
src/snapshots/old_syntax/annotation_tag_parens_comment.md
Normal file
38
src/snapshots/old_syntax/annotation_tag_parens_comment.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_tag_parens_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
g:[T(T#
|
||||
)]
|
||||
D
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `g` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),OpenSquare(1:3-1:4),UpperIdent(1:4-1:5),NoSpaceOpenRound(1:5-1:6),UpperIdent(1:6-1:7),Newline(1:8-1:8),
|
||||
CloseRound(2:1-2:2),CloseSquare(2:2-2:3),Newline(1:1-1:1),
|
||||
UpperIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "g"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
g
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
35
src/snapshots/old_syntax/annotation_tuple_comment.md
Normal file
35
src/snapshots/old_syntax/annotation_tuple_comment.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_tuple_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
3:(#
|
||||
)n->n
|
||||
0
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:5-1:5),
|
||||
CloseRound(2:1-2:2),LowerIdent(2:2-2:3),OpArrow(2:3-2:5),LowerIdent(2:5-2:6),Newline(1:1-1:1),
|
||||
Int(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (raw "3"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
3
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (value "3") (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "Num(*)"))
|
||||
~~~
|
38
src/snapshots/old_syntax/annotation_tuple_newline.md
Normal file
38
src/snapshots/old_syntax/annotation_tuple_newline.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_tuple_newline
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
d:(J,
|
||||
)g
|
||||
2
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `d` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),UpperIdent(1:4-1:5),Comma(1:5-1:6),Newline(1:1-1:1),
|
||||
CloseRound(2:1-2:2),LowerIdent(2:2-2:3),Newline(1:1-1:1),
|
||||
Int(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "d"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
d
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
40
src/snapshots/old_syntax/annotation_tuple_parens_newlines.md
Normal file
40
src/snapshots/old_syntax/annotation_tuple_parens_newlines.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_tuple_parens_newlines
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
p:(
|
||||
)(
|
||||
i)
|
||||
{}
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `p` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:1-1:1),
|
||||
CloseRound(2:1-2:2),NoSpaceOpenRound(2:2-2:3),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),CloseRound(3:2-3:3),Newline(1:1-1:1),
|
||||
OpenCurly(4:1-4:2),CloseCurly(4:2-4:3),EndOfFile(4:3-4:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "p"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
p
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
35
src/snapshots/old_syntax/annotation_tuples_ext_galore.md
Normal file
35
src/snapshots/old_syntax/annotation_tuples_ext_galore.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=annotation_tuples_ext_galore
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
1:(()(n#
|
||||
))(n)
|
||||
l
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),NoSpaceOpenRound(1:4-1:5),CloseRound(1:5-1:6),NoSpaceOpenRound(1:6-1:7),LowerIdent(1:7-1:8),Newline(1:9-1:9),
|
||||
CloseRound(2:1-2:2),CloseRound(2:2-2:3),NoSpaceOpenRound(2:3-2:4),LowerIdent(2:4-2:5),CloseRound(2:5-2:6),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (raw "1"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
1
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (value "1") (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "Num(*)"))
|
||||
~~~
|
38
src/snapshots/old_syntax/applies_in_binop.md
Normal file
38
src/snapshots/old_syntax/applies_in_binop.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=applies_in_binop
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
Str.getUnsafe haystack haystackIndex
|
||||
==
|
||||
Str.getUnsafe needle needleIndex
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `getUnsafe` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:4),NoSpaceDotLowerIdent(1:4-1:14),LowerIdent(1:15-1:23),LowerIdent(1:24-1:37),Newline(1:1-1:1),
|
||||
OpEquals(2:1-2:3),Newline(1:1-1:1),
|
||||
UpperIdent(3:1-3:4),NoSpaceDotLowerIdent(3:4-3:14),LowerIdent(3:15-3:21),LowerIdent(3:22-3:33),EndOfFile(3:33-3:33),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.14 (qaul "Str") (raw ".getUnsafe"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
Str.getUnsafe
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
48
src/snapshots/old_syntax/apply_bang_bang_closure.md
Normal file
48
src/snapshots/old_syntax/apply_bang_bang_closure.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_bang_bang_closure
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
!!
|
||||
\w->2
|
||||
n
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **!!** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**apply_bang_bang_closure.md:1:1:1:3:**
|
||||
```roc
|
||||
!!
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBang(1:1-1:2),OpBang(1:2-1:3),Newline(1:1-1:1),
|
||||
OpBackslash(2:2-2:3),LowerIdent(2:3-2:4),OpArrow(2:4-2:6),Int(2:6-2:7),Newline(1:1-1:1),
|
||||
LowerIdent(3:2-3:3),EndOfFile(3:3-3:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
40
src/snapshots/old_syntax/apply_binop_switch.md
Normal file
40
src/snapshots/old_syntax/apply_binop_switch.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_binop_switch
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
i<2
|
||||
(-6)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `i` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpLessThan(1:2-1:3),Int(1:3-1:4),Newline(1:1-1:1),
|
||||
OpenRound(2:1-2:2),OpBinaryMinus(2:2-2:3),Int(2:3-2:4),CloseRound(2:4-2:5),EndOfFile(2:5-2:5),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-2.2 (op "<")
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "i"))
|
||||
(e-int @1.3-1.4 (raw "2")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
i < 2
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-2.2 (op "lt") (id 76)
|
||||
(e-runtime-error (tag "ident_not_in_scope"))
|
||||
(e-int @1.3-1.4 (value "2")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 76) (type "*"))
|
||||
~~~
|
36
src/snapshots/old_syntax/apply_closure_pizza.md
Normal file
36
src/snapshots/old_syntax/apply_closure_pizza.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_closure_pizza
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
foo
|
||||
|> Dict.keepIf \(k, _v) -> List.contains keysToDelete k |> Bool.not
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `foo` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:4),Newline(1:1-1:1),
|
||||
OpPizza(2:1-2:3),UpperIdent(2:4-2:8),NoSpaceDotLowerIdent(2:8-2:15),OpBackslash(2:16-2:17),NoSpaceOpenRound(2:17-2:18),LowerIdent(2:18-2:19),Comma(2:19-2:20),NamedUnderscore(2:21-2:23),CloseRound(2:23-2:24),OpArrow(2:25-2:27),UpperIdent(2:28-2:32),NoSpaceDotLowerIdent(2:32-2:41),LowerIdent(2:42-2:54),LowerIdent(2:55-2:56),OpPizza(2:57-2:59),UpperIdent(2:60-2:64),NoSpaceDotLowerIdent(2:64-2:68),EndOfFile(2:68-2:68),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.4 (qaul "") (raw "foo"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
foo
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
31
src/snapshots/old_syntax/apply_parenthetical_tag_args.md
Normal file
31
src/snapshots/old_syntax/apply_parenthetical_tag_args.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_parenthetical_tag_args
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
Whee (12) (34)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:5),OpenRound(1:6-1:7),Int(1:7-1:9),CloseRound(1:9-1:10),OpenRound(1:11-1:12),Int(1:12-1:14),CloseRound(1:14-1:15),EndOfFile(1:15-1:15),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.5 (raw "Whee"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
Whee
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.5 (ext-var 73) (name "Whee") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[Whee]*"))
|
||||
~~~
|
38
src/snapshots/old_syntax/apply_record_ann.md
Normal file
38
src/snapshots/old_syntax/apply_record_ann.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_record_ann
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
a:N{h,
|
||||
}
|
||||
g
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `a` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),OpenCurly(1:4-1:5),LowerIdent(1:5-1:6),Comma(1:6-1:7),Newline(1:1-1:1),
|
||||
CloseCurly(2:1-2:2),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "a"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
a
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
|
@ -0,0 +1,33 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_record_parens_newline_field
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
0{l,xt,l:(se#
|
||||
)}
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpenCurly(1:2-1:3),LowerIdent(1:3-1:4),Comma(1:4-1:5),LowerIdent(1:5-1:7),Comma(1:7-1:8),LowerIdent(1:8-1:9),OpColon(1:9-1:10),NoSpaceOpenRound(1:10-1:11),LowerIdent(1:11-1:13),Newline(1:14-1:14),
|
||||
CloseRound(2:1-2:2),CloseCurly(2:2-2:3),EndOfFile(2:3-2:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (raw "0"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
0
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (value "0") (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "Num(*)"))
|
||||
~~~
|
31
src/snapshots/old_syntax/apply_tag.md
Normal file
31
src/snapshots/old_syntax/apply_tag.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_tag
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
Whee 12 34
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:5),Int(1:6-1:8),Int(1:9-1:11),EndOfFile(1:11-1:11),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.5 (raw "Whee"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
Whee
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.5 (ext-var 73) (name "Whee") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[Whee]*"))
|
||||
~~~
|
37
src/snapshots/old_syntax/apply_tag_pnc.md
Normal file
37
src/snapshots/old_syntax/apply_tag_pnc.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_tag_pnc
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
Whee(12, 34)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:5),NoSpaceOpenRound(1:5-1:6),Int(1:6-1:8),Comma(1:8-1:9),Int(1:10-1:12),CloseRound(1:12-1:13),EndOfFile(1:13-1:13),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-apply @1.1-1.13
|
||||
(e-tag @1.1-1.5 (raw "Whee"))
|
||||
(e-int @1.6-1.8 (raw "12"))
|
||||
(e-int @1.10-1.12 (raw "34")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
NO CHANGE
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-call @1.1-1.13 (id 78)
|
||||
(e-tag @1.1-1.5 (ext-var 73) (name "Whee") (args "TODO"))
|
||||
(e-int @1.6-1.8 (value "12"))
|
||||
(e-int @1.10-1.12 (value "34")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 78) (type "*"))
|
||||
~~~
|
34
src/snapshots/old_syntax/apply_three_args.md
Normal file
34
src/snapshots/old_syntax/apply_three_args.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_three_args
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
a b c d
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `a` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),LowerIdent(1:3-1:4),LowerIdent(1:5-1:6),LowerIdent(1:7-1:8),EndOfFile(1:8-1:8),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "a"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
a
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
36
src/snapshots/old_syntax/apply_tuple_ext_parens_ty.md
Normal file
36
src/snapshots/old_syntax/apply_tuple_ext_parens_ty.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_tuple_ext_parens_ty
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
i:M()(Y) c
|
||||
t
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `i` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),NoSpaceOpenRound(1:4-1:5),CloseRound(1:5-1:6),NoSpaceOpenRound(1:6-1:7),UpperIdent(1:7-1:8),CloseRound(1:8-1:9),LowerIdent(1:10-1:11),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:2),EndOfFile(2:2-2:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "i"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
i
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
34
src/snapshots/old_syntax/apply_two_args.md
Normal file
34
src/snapshots/old_syntax/apply_two_args.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_two_args
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
whee 12 34
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `whee` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:5),Int(1:7-1:9),Int(1:11-1:13),EndOfFile(1:13-1:13),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.5 (qaul "") (raw "whee"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
whee
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
40
src/snapshots/old_syntax/apply_two_args_pnc.md
Normal file
40
src/snapshots/old_syntax/apply_two_args_pnc.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_two_args_pnc
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
whee(12, 34)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `whee` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:5),NoSpaceOpenRound(1:5-1:6),Int(1:6-1:8),Comma(1:8-1:9),Int(1:11-1:13),CloseRound(1:13-1:14),EndOfFile(1:14-1:14),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-apply @1.1-1.14
|
||||
(e-ident @1.1-1.5 (qaul "") (raw "whee"))
|
||||
(e-int @1.6-1.8 (raw "12"))
|
||||
(e-int @1.11-1.13 (raw "34")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
whee(12, 34)
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-call @1.1-1.14 (id 78)
|
||||
(e-runtime-error (tag "ident_not_in_scope"))
|
||||
(e-int @1.6-1.8 (value "12"))
|
||||
(e-int @1.11-1.13 (value "34")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 78) (type "*"))
|
||||
~~~
|
44
src/snapshots/old_syntax/apply_unary_negation.md
Normal file
44
src/snapshots/old_syntax/apply_unary_negation.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_unary_negation
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
-whee 12 foo
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **-whee** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**apply_unary_negation.md:1:1:1:6:**
|
||||
```roc
|
||||
-whee 12 foo
|
||||
```
|
||||
^^^^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpUnaryMinus(1:1-1:2),LowerIdent(1:2-1:6),Int(1:8-1:10),LowerIdent(1:11-1:14),EndOfFile(1:14-1:14),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.6 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
44
src/snapshots/old_syntax/apply_unary_not.md
Normal file
44
src/snapshots/old_syntax/apply_unary_not.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=apply_unary_not
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
!whee 12 foo
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **!whee** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**apply_unary_not.md:1:1:1:6:**
|
||||
```roc
|
||||
!whee 12 foo
|
||||
```
|
||||
^^^^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBang(1:1-1:2),LowerIdent(1:2-1:6),Int(1:8-1:10),LowerIdent(1:11-1:14),EndOfFile(1:14-1:14),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.6 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
46
src/snapshots/old_syntax/arg_pattern_as.md
Normal file
46
src/snapshots/old_syntax/arg_pattern_as.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=arg_pattern_as
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\({ x, y } as point), (@Location inner as outer) ->
|
||||
crash ""
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\(** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**arg_pattern_as.md:1:1:1:3:**
|
||||
```roc
|
||||
\({ x, y } as point), (@Location inner as outer) ->
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),NoSpaceOpenRound(1:2-1:3),OpenCurly(1:3-1:4),LowerIdent(1:5-1:6),Comma(1:6-1:7),LowerIdent(1:8-1:9),CloseCurly(1:10-1:11),KwAs(1:12-1:14),LowerIdent(1:15-1:20),CloseRound(1:20-1:21),Comma(1:21-1:22),OpenRound(1:23-1:24),OpaqueName(1:24-1:33),LowerIdent(1:34-1:39),KwAs(1:40-1:42),LowerIdent(1:43-1:48),CloseRound(1:48-1:49),OpArrow(1:50-1:52),Newline(1:1-1:1),
|
||||
KwCrash(2:5-2:10),StringStart(2:11-2:12),StringPart(2:12-2:12),StringEnd(2:12-2:13),EndOfFile(2:13-2:13),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
38
src/snapshots/old_syntax/as_in_func_type_args.md
Normal file
38
src/snapshots/old_syntax/as_in_func_type_args.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=as_in_func_type_args
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
e:J
|
||||
as H->A
|
||||
r
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `e` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),UpperIdent(1:3-1:4),Newline(1:1-1:1),
|
||||
KwAs(2:3-2:5),UpperIdent(2:6-2:7),OpArrow(2:7-2:9),UpperIdent(2:9-2:10),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "e"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
e
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
|
@ -0,0 +1,42 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=assign_parens_item_newline_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
a=(
|
||||
i
|
||||
#
|
||||
)
|
||||
r
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `a` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpAssign(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:2),Newline(1:1-1:1),
|
||||
Newline(3:2-3:2),
|
||||
CloseRound(4:1-4:2),Newline(1:1-1:1),
|
||||
LowerIdent(5:1-5:2),EndOfFile(5:2-5:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "a"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
a
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
36
src/snapshots/old_syntax/backslash_closure_last_expr.md
Normal file
36
src/snapshots/old_syntax/backslash_closure_last_expr.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=backslash_closure_last_expr
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
b
|
||||
\e->s
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `b` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),Newline(1:1-1:1),
|
||||
OpBackslash(2:1-2:2),LowerIdent(2:2-2:3),OpArrow(2:3-2:5),LowerIdent(2:5-2:6),EndOfFile(2:6-2:6),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "b"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
b
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
31
src/snapshots/old_syntax/bad_opaque_ref.md
Normal file
31
src/snapshots/old_syntax/bad_opaque_ref.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=bad_opaque_ref malformed
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
I@
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),MalformedOpaqueNameWithoutName(1:2-1:3),EndOfFile(1:3-1:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "I"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
I
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "I") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[I]*"))
|
||||
~~~
|
37
src/snapshots/old_syntax/bang_newline_double_accessor.md
Normal file
37
src/snapshots/old_syntax/bang_newline_double_accessor.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=bang_newline_double_accessor
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
0
|
||||
!
|
||||
.d
|
||||
.d
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),Newline(1:1-1:1),
|
||||
OpBang(2:1-2:2),Newline(1:1-1:1),
|
||||
DotLowerIdent(3:1-3:3),Newline(1:1-1:1),
|
||||
DotLowerIdent(4:1-4:3),EndOfFile(4:3-4:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (raw "0"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
0
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (value "0") (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "Num(*)"))
|
||||
~~~
|
35
src/snapshots/old_syntax/bangs_and_tuple_accessors.md
Normal file
35
src/snapshots/old_syntax/bangs_and_tuple_accessors.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=bangs_and_tuple_accessors
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
J
|
||||
!
|
||||
.1!.0
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),Newline(1:1-1:1),
|
||||
OpBang(2:1-2:2),Newline(1:1-1:1),
|
||||
DotInt(3:1-3:3),OpBang(3:3-3:4),NoSpaceDotInt(3:4-3:6),EndOfFile(3:6-3:6),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "J"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
J
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "J") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[J]*"))
|
||||
~~~
|
34
src/snapshots/old_syntax/basic_apply.md
Normal file
34
src/snapshots/old_syntax/basic_apply.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=basic_apply
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
whee 1
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `whee` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:5),Int(1:6-1:7),EndOfFile(1:7-1:7),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.5 (qaul "") (raw "whee"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
whee
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
61
src/snapshots/old_syntax/basic_docs.md
Normal file
61
src/snapshots/old_syntax/basic_docs.md
Normal file
|
@ -0,0 +1,61 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=basic_docs
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
## first line of docs
|
||||
## second line
|
||||
## third line
|
||||
## fourth line
|
||||
##
|
||||
## sixth line after doc new line
|
||||
x = 5
|
||||
|
||||
42
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **# first line of docs
|
||||
## second line** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**basic_docs.md:1:2:2:19:**
|
||||
```roc
|
||||
## first line of docs
|
||||
## second line
|
||||
```
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Newline(1:2-1:22),
|
||||
Newline(2:2-2:19),
|
||||
Newline(3:2-3:15),
|
||||
Newline(4:2-4:15),
|
||||
Newline(5:2-5:3),
|
||||
Newline(6:2-6:33),
|
||||
LowerIdent(7:1-7:2),OpAssign(7:3-7:4),Int(7:5-7:6),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
Int(9:1-9:3),EndOfFile(9:3-9:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.2-2.19 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
38
src/snapshots/old_syntax/basic_field.md
Normal file
38
src/snapshots/old_syntax/basic_field.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=basic_field
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
rec.field
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `rec` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:4),NoSpaceDotLowerIdent(1:4-1:10),EndOfFile(1:10-1:10),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-field-access @1.1-1.10
|
||||
(e-ident @1.1-1.4 (qaul "") (raw "rec"))
|
||||
(e-ident @1.4-1.10 (qaul "") (raw ".field")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
NO CHANGE
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-dot-access @1.1-1.10 (field "field") (id 75)
|
||||
(receiver
|
||||
(e-runtime-error (tag "ident_not_in_scope"))))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 75) (type "*"))
|
||||
~~~
|
31
src/snapshots/old_syntax/basic_tag.md
Normal file
31
src/snapshots/old_syntax/basic_tag.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=basic_tag
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
Whee
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:5),EndOfFile(1:5-1:5),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.5 (raw "Whee"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
NO CHANGE
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.5 (ext-var 73) (name "Whee") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[Whee]*"))
|
||||
~~~
|
38
src/snapshots/old_syntax/basic_tuple.md
Normal file
38
src/snapshots/old_syntax/basic_tuple.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=basic_tuple
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
(1, 2, 3)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenRound(1:1-1:2),Int(1:2-1:3),Comma(1:3-1:4),Int(1:5-1:6),Comma(1:6-1:7),Int(1:8-1:9),CloseRound(1:9-1:10),EndOfFile(1:10-1:10),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tuple @1.1-1.10
|
||||
(e-int @1.2-1.3 (raw "1"))
|
||||
(e-int @1.5-1.6 (raw "2"))
|
||||
(e-int @1.8-1.9 (raw "3")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
NO CHANGE
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tuple @1.1-1.10 (id 76)
|
||||
(elems
|
||||
(e-int @1.2-1.3 (value "1"))
|
||||
(e-int @1.5-1.6 (value "2"))
|
||||
(e-int @1.8-1.9 (value "3"))))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 76) (type "(Num(*), Num(*), Num(*))"))
|
||||
~~~
|
34
src/snapshots/old_syntax/basic_var.md
Normal file
34
src/snapshots/old_syntax/basic_var.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=basic_var
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
whee
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `whee` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:5),EndOfFile(1:5-1:5),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.5 (qaul "") (raw "whee"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
NO CHANGE
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
38
src/snapshots/old_syntax/binop_apply_complex.md
Normal file
38
src/snapshots/old_syntax/binop_apply_complex.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=binop_apply_complex
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
N<l (r*N)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `l` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),OpLessThan(1:2-1:3),LowerIdent(1:3-1:4),OpenRound(1:5-1:6),LowerIdent(1:6-1:7),OpStar(1:7-1:8),UpperIdent(1:8-1:9),CloseRound(1:9-1:10),EndOfFile(1:10-1:10),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-1.6 (op "<")
|
||||
(e-tag @1.1-1.2 (raw "N"))
|
||||
(e-ident @1.3-1.4 (qaul "") (raw "l")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
N < l
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-1.6 (op "lt") (id 77)
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "N") (args "TODO"))
|
||||
(e-runtime-error (tag "ident_not_in_scope")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 77) (type "*"))
|
||||
~~~
|
54
src/snapshots/old_syntax/binop_assign_defs_nested.md
Normal file
54
src/snapshots/old_syntax/binop_assign_defs_nested.md
Normal file
|
@ -0,0 +1,54 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=binop_assign_defs_nested
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
5-((e=((
|
||||
r))
|
||||
1))
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**PARSE ERROR**
|
||||
A parsing error occurred: `expected_expr_close_round_or_comma`
|
||||
This is an unexpected parsing error. Please check your syntax.
|
||||
|
||||
Here is the problematic code:
|
||||
**binop_assign_defs_nested.md:2:2:2:4:**
|
||||
```roc
|
||||
r))
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpBinaryMinus(1:2-1:3),NoSpaceOpenRound(1:3-1:4),NoSpaceOpenRound(1:4-1:5),LowerIdent(1:5-1:6),OpAssign(1:6-1:7),NoSpaceOpenRound(1:7-1:8),NoSpaceOpenRound(1:8-1:9),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:2),CloseRound(2:2-2:3),CloseRound(2:3-2:4),Newline(1:1-1:1),
|
||||
Int(3:1-3:2),CloseRound(3:2-3:3),CloseRound(3:3-3:4),EndOfFile(3:4-3:4),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-3.2 (op "-")
|
||||
(e-int @1.1-1.2 (raw "5"))
|
||||
(e-tuple @1.3-2.4
|
||||
(e-malformed @2.2-2.4 (reason "expected_expr_close_round_or_comma"))))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
5 - (
|
||||
,
|
||||
)
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-3.2 (op "sub") (id 75)
|
||||
(e-int @1.1-1.2 (value "5"))
|
||||
(e-tuple @1.3-2.4
|
||||
(elems)))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 75) (type "*"))
|
||||
~~~
|
59
src/snapshots/old_syntax/binop_closure_apply.md
Normal file
59
src/snapshots/old_syntax/binop_closure_apply.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=binop_closure_apply
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
d+
|
||||
\w->x
|
||||
x
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\w** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**binop_closure_apply.md:2:2:2:4:**
|
||||
```roc
|
||||
\w->x
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `d` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
**UNKNOWN OPERATOR**
|
||||
This looks like an operator, but it's not one I recognize!
|
||||
Check the spelling and make sure you're using a valid Roc operator.
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpPlus(1:2-1:3),Newline(1:1-1:1),
|
||||
OpBackslash(2:2-2:3),LowerIdent(2:3-2:4),OpArrow(2:4-2:6),LowerIdent(2:6-2:7),Newline(1:1-1:1),
|
||||
LowerIdent(3:2-3:3),EndOfFile(3:3-3:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-2.4 (op "+")
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "d"))
|
||||
(e-malformed @2.2-2.4 (reason "expr_unexpected_token")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
d +
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-2.4 (op "add") (id 77)
|
||||
(e-runtime-error (tag "ident_not_in_scope"))
|
||||
(e-runtime-error (tag "expr_not_canonicalized")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 77) (type "*"))
|
||||
~~~
|
40
src/snapshots/old_syntax/binops_comment_indent_change.md
Normal file
40
src/snapshots/old_syntax/binops_comment_indent_change.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=binops_comment_indent_change
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
r^
|
||||
-f
|
||||
#
|
||||
-P
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `r` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpCaret(1:2-1:3),Newline(1:1-1:1),
|
||||
OpUnaryMinus(2:1-2:2),LowerIdent(2:2-2:3),Newline(1:1-1:1),
|
||||
Newline(3:2-3:2),
|
||||
OpUnaryMinus(4:2-4:3),UpperIdent(4:3-4:4),EndOfFile(4:4-4:4),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "r"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
r
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
46
src/snapshots/old_syntax/block_string_ann.md
Normal file
46
src/snapshots/old_syntax/block_string_ann.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=block_string_ann
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
"""${g}""":q
|
||||
f
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **"""** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**block_string_ann.md:1:1:1:4:**
|
||||
```roc
|
||||
"""${g}""":q
|
||||
```
|
||||
^^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
MultilineStringStart(1:1-1:4),StringPart(1:4-1:4),OpenStringInterpolation(1:4-1:6),LowerIdent(1:6-1:7),CloseStringInterpolation(1:7-1:8),StringPart(1:8-1:8),MultilineStringEnd(1:8-1:11),OpColon(1:11-1:12),LowerIdent(1:12-1:13),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:2),EndOfFile(2:2-2:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.4 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
36
src/snapshots/old_syntax/body_block_string_apply_string.md
Normal file
36
src/snapshots/old_syntax/body_block_string_apply_string.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=body_block_string_apply_string
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
t="""" """""
|
||||
S
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `t` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpAssign(1:2-1:3),MultilineStringStart(1:3-1:6),StringPart(1:6-1:8),MultilineStringEnd(1:8-1:11),StringStart(1:11-1:12),StringPart(1:12-1:12),StringEnd(1:12-1:13),Newline(1:1-1:1),
|
||||
UpperIdent(2:1-2:2),EndOfFile(2:2-2:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "t"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
t
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
38
src/snapshots/old_syntax/body_with_unneeded_parens.md
Normal file
38
src/snapshots/old_syntax/body_with_unneeded_parens.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=body_with_unneeded_parens
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
a=(
|
||||
6)
|
||||
a
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `a` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpAssign(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Newline(1:1-1:1),
|
||||
Int(2:1-2:2),CloseRound(2:2-2:3),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "a"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
a
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
36
src/snapshots/old_syntax/bound_variable.md
Normal file
36
src/snapshots/old_syntax/bound_variable.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=bound_variable fail
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
a:
|
||||
c 0
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `a` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),Newline(1:1-1:1),
|
||||
LowerIdent(2:1-2:2),Int(2:3-2:4),EndOfFile(2:4-2:4),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "a"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
a
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
34
src/snapshots/old_syntax/call_bang.md
Normal file
34
src/snapshots/old_syntax/call_bang.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=call_bang
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
launchTheNukes! 123
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `launchTheNukes!` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:16),Int(1:17-1:20),EndOfFile(1:20-1:20),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.16 (qaul "") (raw "launchTheNukes!"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
launchTheNukes!
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
34
src/snapshots/old_syntax/call_bang_no_space.md
Normal file
34
src/snapshots/old_syntax/call_bang_no_space.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=call_bang_no_space
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
fxFn!arg
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `fxFn!arg` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:9),EndOfFile(1:9-1:9),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.9 (qaul "") (raw "fxFn!arg"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
NO CHANGE
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
48
src/snapshots/old_syntax/can_ignored_field_in_import.md
Normal file
48
src/snapshots/old_syntax/can_ignored_field_in_import.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=can_ignored_field_in_import
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
import P{_:h
|
||||
}
|
||||
t!
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **import P** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**can_ignored_field_in_import.md:1:1:1:9:**
|
||||
```roc
|
||||
import P{_:h
|
||||
```
|
||||
^^^^^^^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
KwImport(1:1-1:7),UpperIdent(1:8-1:9),OpenCurly(1:9-1:10),Underscore(1:10-1:11),OpColon(1:11-1:12),LowerIdent(1:12-1:13),Newline(1:1-1:1),
|
||||
CloseCurly(2:1-2:2),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:3),EndOfFile(3:3-3:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.9 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
48
src/snapshots/old_syntax/capture_body_parens_comment.md
Normal file
48
src/snapshots/old_syntax/capture_body_parens_comment.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=capture_body_parens_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\L->(E
|
||||
#
|
||||
)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\L** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**capture_body_parens_comment.md:1:1:1:3:**
|
||||
```roc
|
||||
\L->(E
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),UpperIdent(1:2-1:3),OpArrow(1:3-1:5),NoSpaceOpenRound(1:5-1:6),UpperIdent(1:6-1:7),Newline(1:1-1:1),
|
||||
Newline(2:2-2:2),
|
||||
CloseRound(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
44
src/snapshots/old_syntax/closure_arg_parens_then_comment.md
Normal file
44
src/snapshots/old_syntax/closure_arg_parens_then_comment.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_arg_parens_then_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\(8)->T#
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\(** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**closure_arg_parens_then_comment.md:1:1:1:3:**
|
||||
```roc
|
||||
\(8)->T#
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),NoSpaceOpenRound(1:2-1:3),Int(1:3-1:4),CloseRound(1:4-1:5),OpArrow(1:5-1:7),UpperIdent(1:7-1:8),EndOfFile(1:9-1:9),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
|
@ -0,0 +1,50 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_complex_pattern_indent_issue
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\I{p?Y
|
||||
Y}[
|
||||
]->
|
||||
K#(
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\I** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**closure_complex_pattern_indent_issue.md:1:1:1:3:**
|
||||
```roc
|
||||
\I{p?Y
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),UpperIdent(1:2-1:3),OpenCurly(1:3-1:4),LowerIdent(1:4-1:5),NoSpaceOpQuestion(1:5-1:6),UpperIdent(1:6-1:7),Newline(1:1-1:1),
|
||||
UpperIdent(2:2-2:3),CloseCurly(2:3-2:4),OpenSquare(2:4-2:5),Newline(1:1-1:1),
|
||||
CloseSquare(3:1-3:2),OpArrow(3:2-3:4),Newline(1:1-1:1),
|
||||
UpperIdent(4:2-4:3),EndOfFile(4:5-4:5),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
36
src/snapshots/old_syntax/closure_in_apply_in_binop.md
Normal file
36
src/snapshots/old_syntax/closure_in_apply_in_binop.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_in_apply_in_binop
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
m0\w->w?e
|
||||
/s
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `m0` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:3),OpBackslash(1:3-1:4),LowerIdent(1:4-1:5),OpArrow(1:5-1:7),LowerIdent(1:7-1:8),NoSpaceOpQuestion(1:8-1:9),LowerIdent(1:9-1:10),Newline(1:1-1:1),
|
||||
OpSlash(2:1-2:2),LowerIdent(2:2-2:3),EndOfFile(2:3-2:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.3 (qaul "") (raw "m0"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
m0
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
56
src/snapshots/old_syntax/closure_in_binop_with_spaces.md
Normal file
56
src/snapshots/old_syntax/closure_in_binop_with_spaces.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_in_binop_with_spaces
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
i>\s->s
|
||||
-a
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\s** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**closure_in_binop_with_spaces.md:1:3:1:5:**
|
||||
```roc
|
||||
i>\s->s
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `i` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
**UNKNOWN OPERATOR**
|
||||
This looks like an operator, but it's not one I recognize!
|
||||
Check the spelling and make sure you're using a valid Roc operator.
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpGreaterThan(1:2-1:3),OpBackslash(1:3-1:4),LowerIdent(1:4-1:5),OpArrow(1:5-1:7),LowerIdent(1:7-1:8),Newline(1:1-1:1),
|
||||
OpUnaryMinus(2:1-2:2),LowerIdent(2:2-2:3),EndOfFile(2:3-2:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-1.5 (op ">")
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "i"))
|
||||
(e-malformed @1.3-1.5 (reason "expr_unexpected_token")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
i >
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-1.5 (op "gt") (id 77)
|
||||
(e-runtime-error (tag "ident_not_in_scope"))
|
||||
(e-runtime-error (tag "expr_not_canonicalized")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 77) (type "*"))
|
||||
~~~
|
|
@ -0,0 +1,50 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_newline_empty_record_newline
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\L->
|
||||
{
|
||||
}
|
||||
Θ
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\L** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**closure_newline_empty_record_newline.md:1:1:1:3:**
|
||||
```roc
|
||||
\L->
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),UpperIdent(1:2-1:3),OpArrow(1:3-1:5),Newline(1:1-1:1),
|
||||
OpenCurly(2:2-2:3),Newline(1:1-1:1),
|
||||
CloseCurly(3:1-3:2),Newline(1:1-1:1),
|
||||
MalformedUnicodeIdent(4:1-4:3),EndOfFile(4:3-4:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
48
src/snapshots/old_syntax/closure_parens_double_newlines.md
Normal file
48
src/snapshots/old_syntax/closure_parens_double_newlines.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_parens_double_newlines
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\L((z
|
||||
)
|
||||
)->42
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\L** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**closure_parens_double_newlines.md:1:1:1:3:**
|
||||
```roc
|
||||
\L((z
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),UpperIdent(1:2-1:3),NoSpaceOpenRound(1:3-1:4),NoSpaceOpenRound(1:4-1:5),LowerIdent(1:5-1:6),Newline(1:1-1:1),
|
||||
CloseRound(2:1-2:2),Newline(1:1-1:1),
|
||||
CloseRound(3:1-3:2),OpArrow(3:2-3:4),Int(3:4-3:6),EndOfFile(3:6-3:6),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
46
src/snapshots/old_syntax/closure_pat_reccord_comment.md
Normal file
46
src/snapshots/old_syntax/closure_pat_reccord_comment.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_pat_reccord_comment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\{i#
|
||||
,e}->a
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\{** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**closure_pat_reccord_comment.md:1:1:1:3:**
|
||||
```roc
|
||||
\{i#
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),OpenCurly(1:2-1:3),LowerIdent(1:3-1:4),Newline(1:5-1:5),
|
||||
Comma(2:1-2:2),LowerIdent(2:2-2:3),CloseCurly(2:3-2:4),OpArrow(2:4-2:6),LowerIdent(2:6-2:7),EndOfFile(2:7-2:7),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
38
src/snapshots/old_syntax/closure_with_binops_and_unary.md
Normal file
38
src/snapshots/old_syntax/closure_with_binops_and_unary.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_with_binops_and_unary
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
m
|
||||
^ -\w->m
|
||||
w
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `m` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),Newline(1:1-1:1),
|
||||
OpCaret(2:2-2:3),OpUnaryMinus(2:4-2:5),OpBackslash(2:5-2:6),LowerIdent(2:6-2:7),OpArrow(2:7-2:9),LowerIdent(2:9-2:10),Newline(1:1-1:1),
|
||||
LowerIdent(3:2-3:3),EndOfFile(3:3-3:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "m"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
m
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
44
src/snapshots/old_syntax/closure_with_underscores.md
Normal file
44
src/snapshots/old_syntax/closure_with_underscores.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=closure_with_underscores
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\_, _name -> 42
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\_** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**closure_with_underscores.md:1:1:1:3:**
|
||||
```roc
|
||||
\_, _name -> 42
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),Underscore(1:2-1:3),Comma(1:3-1:4),NamedUnderscore(1:5-1:10),OpArrow(1:11-1:13),Int(1:14-1:16),EndOfFile(1:16-1:16),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
45
src/snapshots/old_syntax/comma_prefixed_indented_record.md
Normal file
45
src/snapshots/old_syntax/comma_prefixed_indented_record.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comma_prefixed_indented_record
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
Model position :
|
||||
{ evaluated : Set position
|
||||
, openSet : Set position
|
||||
, costs : Dict.Dict position F64
|
||||
, cameFrom : Dict.Dict position position
|
||||
}
|
||||
|
||||
a
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:6),LowerIdent(1:7-1:15),OpColon(1:16-1:17),Newline(1:1-1:1),
|
||||
OpenCurly(2:5-2:6),LowerIdent(2:7-2:16),OpColon(2:17-2:18),UpperIdent(2:19-2:22),LowerIdent(2:23-2:31),Newline(1:1-1:1),
|
||||
Comma(3:5-3:6),LowerIdent(3:7-3:14),OpColon(3:15-3:16),UpperIdent(3:17-3:20),LowerIdent(3:21-3:29),Newline(1:1-1:1),
|
||||
Comma(4:5-4:6),LowerIdent(4:7-4:12),OpColon(4:13-4:14),UpperIdent(4:15-4:19),NoSpaceDotUpperIdent(4:19-4:24),LowerIdent(4:25-4:33),UpperIdent(4:34-4:37),Newline(1:1-1:1),
|
||||
Comma(5:5-5:6),LowerIdent(5:7-5:15),OpColon(5:16-5:17),UpperIdent(5:18-5:22),NoSpaceDotUpperIdent(5:22-5:27),LowerIdent(5:28-5:36),LowerIdent(5:37-5:45),Newline(1:1-1:1),
|
||||
CloseCurly(6:5-6:6),Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
LowerIdent(8:1-8:2),EndOfFile(8:2-8:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.6 (raw "Model"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
Model
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.6 (ext-var 73) (name "Model") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[Model]*"))
|
||||
~~~
|
37
src/snapshots/old_syntax/comment_after_annotation.md
Normal file
37
src/snapshots/old_syntax/comment_after_annotation.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_after_annotation
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
F:e#
|
||||
|
||||
|
||||
q
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:2),OpColon(1:2-1:3),LowerIdent(1:3-1:4),Newline(1:5-1:5),
|
||||
Newline(1:1-1:1),
|
||||
Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (raw "F"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
F
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tag @1.1-1.2 (ext-var 73) (name "F") (args "TODO") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "[F]*"))
|
||||
~~~
|
|
@ -0,0 +1,33 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_after_dbg_in_empty_record_assignment
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
{}=dbg l#
|
||||
n
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenCurly(1:1-1:2),CloseCurly(1:2-1:3),OpAssign(1:3-1:4),KwDbg(1:4-1:7),LowerIdent(1:8-1:9),Newline(1:10-1:10),
|
||||
LowerIdent(2:1-2:2),EndOfFile(2:2-2:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-record @1.1-1.3)
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
{}
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-empty_record @1.1-1.3 (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "{}"))
|
||||
~~~
|
41
src/snapshots/old_syntax/comment_after_expr_in_parens.md
Normal file
41
src/snapshots/old_syntax/comment_after_expr_in_parens.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_after_expr_in_parens
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
(i#abc
|
||||
)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `i` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenRound(1:1-1:2),LowerIdent(1:2-1:3),Newline(1:4-1:7),
|
||||
CloseRound(2:1-2:2),EndOfFile(2:2-2:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tuple @1.1-2.2
|
||||
(e-ident @1.2-1.3 (qaul "") (raw "i")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
(
|
||||
i, # abc
|
||||
)
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tuple @1.1-2.2 (id 75)
|
||||
(elems
|
||||
(e-runtime-error (tag "ident_not_in_scope"))))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 75) (type "(Error)"))
|
||||
~~~
|
38
src/snapshots/old_syntax/comment_after_op.md
Normal file
38
src/snapshots/old_syntax/comment_after_op.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_after_op
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
12 * # test!
|
||||
92
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:3),OpStar(1:5-1:6),Newline(1:8-1:14),
|
||||
Int(2:2-2:4),EndOfFile(2:4-2:4),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-2.4 (op "*")
|
||||
(e-int @1.1-1.3 (raw "12"))
|
||||
(e-int @2.2-2.4 (raw "92")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
12 * # test!
|
||||
92
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-2.4 (op "mul") (id 75)
|
||||
(e-int @1.1-1.3 (value "12"))
|
||||
(e-int @2.2-2.4 (value "92")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 75) (type "*"))
|
||||
~~~
|
|
@ -0,0 +1,60 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_after_whitespace_apply_arg_inside_pnc_apply
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
PP(P@P(P
|
||||
P(PPP(P
|
||||
PPP
|
||||
)
|
||||
)
|
||||
PP(mport#<|"P
|
||||
)
|
||||
)
|
||||
)
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**PARSE ERROR**
|
||||
A parsing error occurred: `expected_expr_apply_close_round`
|
||||
This is an unexpected parsing error. Please check your syntax.
|
||||
|
||||
Here is the problematic code:
|
||||
**comment_after_whitespace_apply_arg_inside_pnc_apply.md:1:1:1:4:**
|
||||
```roc
|
||||
PP(P@P(P
|
||||
```
|
||||
^^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
UpperIdent(1:1-1:3),NoSpaceOpenRound(1:3-1:4),UpperIdent(1:4-1:5),OpaqueName(1:5-1:7),NoSpaceOpenRound(1:7-1:8),UpperIdent(1:8-1:9),Newline(1:1-1:1),
|
||||
UpperIdent(2:1-2:2),NoSpaceOpenRound(2:2-2:3),UpperIdent(2:3-2:6),NoSpaceOpenRound(2:6-2:7),UpperIdent(2:7-2:8),Newline(1:1-1:1),
|
||||
UpperIdent(3:1-3:4),Newline(1:1-1:1),
|
||||
CloseRound(4:1-4:2),Newline(1:1-1:1),
|
||||
CloseRound(5:1-5:2),Newline(1:1-1:1),
|
||||
UpperIdent(6:1-6:3),NoSpaceOpenRound(6:3-6:4),LowerIdent(6:4-6:9),Newline(6:10-6:14),
|
||||
CloseRound(7:1-7:2),Newline(1:1-1:1),
|
||||
CloseRound(8:1-8:2),Newline(1:1-1:1),
|
||||
CloseRound(9:1-9:2),EndOfFile(9:2-9:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.8 (reason "expected_expr_apply_close_round"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
38
src/snapshots/old_syntax/comment_before_colon_def.md
Normal file
38
src/snapshots/old_syntax/comment_before_colon_def.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_before_colon_def
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
w#
|
||||
:n
|
||||
Q
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `w` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),Newline(1:3-1:3),
|
||||
OpColon(2:1-2:2),LowerIdent(2:2-2:3),Newline(1:1-1:1),
|
||||
UpperIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "w"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
w
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
|
@ -0,0 +1,35 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_before_comma_in_tuple_type_with_func
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
1:(M,b#,
|
||||
,h->g)e
|
||||
h
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),UpperIdent(1:4-1:5),Comma(1:5-1:6),LowerIdent(1:6-1:7),Newline(1:8-1:9),
|
||||
Comma(2:1-2:2),LowerIdent(2:2-2:3),OpArrow(2:3-2:5),LowerIdent(2:5-2:6),CloseRound(2:6-2:7),LowerIdent(2:7-2:8),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (raw "1"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
1
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-int @1.1-1.2 (value "1") (id 73))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 73) (type "Num(*)"))
|
||||
~~~
|
38
src/snapshots/old_syntax/comment_before_equals_def.md
Normal file
38
src/snapshots/old_syntax/comment_before_equals_def.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_before_equals_def
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
t#
|
||||
=3
|
||||
e
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `t` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),Newline(1:3-1:3),
|
||||
OpAssign(2:1-2:2),Int(2:2-2:3),Newline(1:1-1:1),
|
||||
LowerIdent(3:1-3:2),EndOfFile(3:2-3:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "t"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
t
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
38
src/snapshots/old_syntax/comment_before_op.md
Normal file
38
src/snapshots/old_syntax/comment_before_op.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_before_op
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
3 # test!
|
||||
+ 4
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),Newline(1:5-1:11),
|
||||
OpPlus(2:1-2:2),Int(2:3-2:4),EndOfFile(2:4-2:4),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-binop @1.1-2.4 (op "+")
|
||||
(e-int @1.1-1.2 (raw "3"))
|
||||
(e-int @2.3-2.4 (raw "4")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
3 # test!
|
||||
+ 4
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-binop @1.1-2.4 (op "add") (id 75)
|
||||
(e-int @1.1-1.2 (value "3"))
|
||||
(e-int @2.3-2.4 (value "4")))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 75) (type "*"))
|
||||
~~~
|
43
src/snapshots/old_syntax/comment_before_pat_in_parens.md
Normal file
43
src/snapshots/old_syntax/comment_before_pat_in_parens.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_before_pat_in_parens
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
(
|
||||
#
|
||||
6):s
|
||||
h
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpenRound(1:1-1:2),Newline(1:1-1:1),
|
||||
Newline(2:2-2:2),
|
||||
Int(3:1-3:2),CloseRound(3:2-3:3),OpColon(3:3-3:4),LowerIdent(3:4-3:5),Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-tuple @1.1-3.3
|
||||
(e-int @3.1-3.2 (raw "6")))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
(
|
||||
|
||||
6,
|
||||
)
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-tuple @1.1-3.3 (id 74)
|
||||
(elems
|
||||
(e-int @3.1-3.2 (value "6"))))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "(Num(*))"))
|
||||
~~~
|
46
src/snapshots/old_syntax/comment_in_closure_pat.md
Normal file
46
src/snapshots/old_syntax/comment_in_closure_pat.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_in_closure_pat
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\L#
|
||||
i->-e
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\L** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**comment_in_closure_pat.md:1:1:1:3:**
|
||||
```roc
|
||||
\L#
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),UpperIdent(1:2-1:3),Newline(1:4-1:4),
|
||||
LowerIdent(2:2-2:3),OpArrow(2:3-2:5),OpBinaryMinus(2:5-2:6),LowerIdent(2:6-2:7),EndOfFile(2:7-2:7),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
46
src/snapshots/old_syntax/comment_in_closure_pat_apply.md
Normal file
46
src/snapshots/old_syntax/comment_in_closure_pat_apply.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_in_closure_pat_apply
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
\L,M#
|
||||
Q->f8
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNEXPECTED TOKEN IN EXPRESSION**
|
||||
The token **\L** is not expected in an expression.
|
||||
Expressions can be identifiers, literals, function calls, or operators.
|
||||
|
||||
Here is the problematic code:
|
||||
**comment_in_closure_pat_apply.md:1:1:1:3:**
|
||||
```roc
|
||||
\L,M#
|
||||
```
|
||||
^^
|
||||
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
OpBackslash(1:1-1:2),UpperIdent(1:2-1:3),Comma(1:3-1:4),UpperIdent(1:4-1:5),Newline(1:6-1:6),
|
||||
UpperIdent(2:2-2:3),OpArrow(2:3-2:5),LowerIdent(2:5-2:7),EndOfFile(2:7-2:7),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-malformed @1.1-1.3 (reason "expr_unexpected_token"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(can-ir (empty true))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(inferred-types
|
||||
(defs)
|
||||
(expressions))
|
||||
~~~
|
40
src/snapshots/old_syntax/comment_in_tuple_ext.md
Normal file
40
src/snapshots/old_syntax/comment_in_tuple_ext.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_in_tuple_ext
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
t:()(n#
|
||||
#
|
||||
)
|
||||
p#
|
||||
~~~
|
||||
# PROBLEMS
|
||||
**UNDEFINED VARIABLE**
|
||||
Nothing is named `t` in this scope.
|
||||
Is there an `import` or `exposing` missing up-top?
|
||||
|
||||
# TOKENS
|
||||
~~~zig
|
||||
LowerIdent(1:1-1:2),OpColon(1:2-1:3),NoSpaceOpenRound(1:3-1:4),CloseRound(1:4-1:5),NoSpaceOpenRound(1:5-1:6),LowerIdent(1:6-1:7),Newline(1:8-1:8),
|
||||
Newline(2:2-2:2),
|
||||
CloseRound(3:1-3:2),Newline(1:1-1:1),
|
||||
LowerIdent(4:1-4:2),EndOfFile(4:3-4:3),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-ident @1.1-1.2 (qaul "") (raw "t"))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
t
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-runtime-error (tag "ident_not_in_scope") (id 74))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 74) (type "Error"))
|
||||
~~~
|
48
src/snapshots/old_syntax/comment_indent_in_parens.md
Normal file
48
src/snapshots/old_syntax/comment_indent_in_parens.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# META
|
||||
~~~ini
|
||||
description=comment_indent_in_parens
|
||||
type=expr
|
||||
~~~
|
||||
# SOURCE
|
||||
~~~roc
|
||||
1((0#
|
||||
)#
|
||||
):gi
|
||||
M
|
||||
~~~
|
||||
# PROBLEMS
|
||||
NIL
|
||||
# TOKENS
|
||||
~~~zig
|
||||
Int(1:1-1:2),NoSpaceOpenRound(1:2-1:3),NoSpaceOpenRound(1:3-1:4),Int(1:4-1:5),Newline(1:6-1:6),
|
||||
CloseRound(2:1-2:2),Newline(2:3-2:3),
|
||||
CloseRound(3:1-3:2),OpColon(3:2-3:3),LowerIdent(3:3-3:5),Newline(1:1-1:1),
|
||||
UpperIdent(4:1-4:2),EndOfFile(4:2-4:2),
|
||||
~~~
|
||||
# PARSE
|
||||
~~~clojure
|
||||
(e-apply @1.1-3.2
|
||||
(e-int @1.1-1.2 (raw "1"))
|
||||
(e-tuple @1.3-2.2
|
||||
(e-int @1.4-1.5 (raw "0"))))
|
||||
~~~
|
||||
# FORMATTED
|
||||
~~~roc
|
||||
1(
|
||||
(
|
||||
0,
|
||||
),
|
||||
)
|
||||
~~~
|
||||
# CANONICALIZE
|
||||
~~~clojure
|
||||
(e-call @1.1-3.2 (id 77)
|
||||
(e-int @1.1-1.2 (value "1"))
|
||||
(e-tuple @1.3-2.2
|
||||
(elems
|
||||
(e-int @1.4-1.5 (value "0")))))
|
||||
~~~
|
||||
# TYPES
|
||||
~~~clojure
|
||||
(expr (id 77) (type "*"))
|
||||
~~~
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue