roc/test/snapshots/expr/tuple.md
2025-12-01 22:52:21 -05:00

663 B

META

description=Tuple expression
type=expr

SOURCE

(1, "hello", True)

EXPECTED

NIL

PROBLEMS

NIL

TOKENS

OpenRound,Int,Comma,StringStart,StringPart,StringEnd,Comma,UpperIdent,CloseRound,
EndOfFile,

PARSE

(e-tuple
	(e-int (raw "1"))
	(e-string
		(e-string-part (raw "hello")))
	(e-tag (raw "True")))

FORMATTED

NO CHANGE

CANONICALIZE

(e-tuple
	(elems
		(e-num (value "1"))
		(e-string
			(e-literal (string "hello")))
		(e-tag (name "True"))))

TYPES

(expr (type "(a, Str, [True, .._others]) where [a.from_numeral : Numeral -> Try(a, [InvalidNumeral(Str)])]"))