roc/test/snapshots/expr/binop_simple_add.md
2025-11-23 01:22:01 -05:00

500 B

META

description=Binary operation expression simple addition
type=expr

SOURCE

1 + 2

EXPECTED

NIL

PROBLEMS

NIL

TOKENS

Int,OpPlus,Int,
EndOfFile,

PARSE

(e-binop (op "+")
	(e-int (raw "1"))
	(e-int (raw "2")))

FORMATTED

NO CHANGE

CANONICALIZE

(e-binop (op "add")
	(e-num (value "1"))
	(e-num (value "2")))

TYPES

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