mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
43 lines
663 B
Markdown
43 lines
663 B
Markdown
# META
|
|
~~~ini
|
|
description=Tuple expression
|
|
type=expr
|
|
~~~
|
|
# SOURCE
|
|
~~~roc
|
|
(1, "hello", True)
|
|
~~~
|
|
# EXPECTED
|
|
NIL
|
|
# PROBLEMS
|
|
NIL
|
|
# TOKENS
|
|
~~~zig
|
|
OpenRound,Int,Comma,StringStart,StringPart,StringEnd,Comma,UpperIdent,CloseRound,
|
|
EndOfFile,
|
|
~~~
|
|
# PARSE
|
|
~~~clojure
|
|
(e-tuple
|
|
(e-int (raw "1"))
|
|
(e-string
|
|
(e-string-part (raw "hello")))
|
|
(e-tag (raw "True")))
|
|
~~~
|
|
# FORMATTED
|
|
~~~roc
|
|
NO CHANGE
|
|
~~~
|
|
# CANONICALIZE
|
|
~~~clojure
|
|
(e-tuple
|
|
(elems
|
|
(e-num (value "1"))
|
|
(e-string
|
|
(e-literal (string "hello")))
|
|
(e-tag (name "True"))))
|
|
~~~
|
|
# TYPES
|
|
~~~clojure
|
|
(expr (type "(a, Str, [True, .._others]) where [a.from_numeral : Numeral -> Try(a, [InvalidNumeral(Str)])]"))
|
|
~~~
|