If-then-else

This commit is contained in:
Smaug123
2024-01-22 19:22:36 +00:00
parent 4275b5caa7
commit 6c26bcb5eb
3 changed files with 33 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ type Expr =
| Factorial of Expr
| Paren of Expr
| IfThenElse of Expr * Expr * Expr
| IfThen of Expr * Expr
[<RequireQualifiedAccess>]
module Expr =
@@ -28,6 +29,8 @@ module Expr =
let ifThenElse ifClause thenClause elseClause =
Expr.IfThenElse (ifClause, thenClause, elseClause)
let ifThen ifClause thenClause = Expr.IfThen (ifClause, thenClause)
[<RequireQualifiedAccess>]
type TokenType =
| Plus