2022-11-05から1日間の記事一覧
前回のBoolに続いてInt型とそれに関連する式であるIntリテラル、AddとIsZeroを実装する。 型 Int型の追加: type ty = ... | TInt 式 Intリテラル、Add、IsZeroを追加: type exp = ... | EInt of int | EAdd of exp * exp | EIsZero of exp AddはInt型の式…
前回のBoolに続いてInt型とそれに関連する式であるIntリテラル、AddとIsZeroを実装する。 型 Int型の追加: type ty = ... | TInt 式 Intリテラル、Add、IsZeroを追加: type exp = ... | EInt of int | EAdd of exp * exp | EIsZero of exp AddはInt型の式…