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

1.5 KiB

META

description=Tuple containing variations on boolean values
type=expr

SOURCE

(True, False, Bool.True, Bool.False, !True, !False, True and False, !True or !True)

EXPECTED

NIL

PROBLEMS

NIL

TOKENS

OpenRound,UpperIdent,Comma,UpperIdent,Comma,UpperIdent,NoSpaceDotUpperIdent,Comma,UpperIdent,NoSpaceDotUpperIdent,Comma,OpBang,UpperIdent,Comma,OpBang,UpperIdent,Comma,UpperIdent,OpAnd,UpperIdent,Comma,OpBang,UpperIdent,OpOr,OpBang,UpperIdent,CloseRound,
EndOfFile,

PARSE

(e-tuple
	(e-tag (raw "True"))
	(e-tag (raw "False"))
	(e-tag (raw "Bool.True"))
	(e-tag (raw "Bool.False"))
	(unary "!"
		(e-tag (raw "True")))
	(unary "!"
		(e-tag (raw "False")))
	(e-binop (op "and")
		(e-tag (raw "True"))
		(e-tag (raw "False")))
	(e-binop (op "or")
		(unary "!"
			(e-tag (raw "True")))
		(unary "!"
			(e-tag (raw "True")))))

FORMATTED

NO CHANGE

CANONICALIZE

(e-tuple
	(elems
		(e-tag (name "True"))
		(e-tag (name "False"))
		(e-nominal-external
			(builtin)
			(e-tag (name "True")))
		(e-nominal-external
			(builtin)
			(e-tag (name "False")))
		(e-unary-not
			(e-tag (name "True")))
		(e-unary-not
			(e-tag (name "False")))
		(e-binop (op "and")
			(e-tag (name "True"))
			(e-tag (name "False")))
		(e-binop (op "or")
			(e-unary-not
				(e-tag (name "True")))
			(e-unary-not
				(e-tag (name "True"))))))

TYPES

(expr (type "([True, .._others], [False, .._others2], Bool, Bool, Bool, Bool, Bool, Bool)"))