Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crook #15

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
- push
- workflow_dispatch

jobs:
build-and-test:
Expand Down
2 changes: 1 addition & 1 deletion jig/parse.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
;; S-Expr -> Expr
(define (parse-e s)
(match s
[(? datum?) (Lit s)]
['eof (Eof)]
[(? symbol?) (Var s)]
[(? datum?) (Lit s)]
[(list 'quote (list)) (Lit '())]
[(list (? op0? p0)) (Prim0 p0)]
[(list (? op1? p1) e) (Prim1 p1 (parse-e e))]
Expand Down
3 changes: 2 additions & 1 deletion loot/ast.rkt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#lang racket
(provide Lit Prim0 Prim1 Prim2 Prim3 If Eof Begin
Let Var Prog Defn App
Match Box Cons Conj Lam)
Match Box Cons Conj
Lam)

;; type Prog = (Prog (Listof Defn) Expr)
(struct Prog (ds e) #:prefab)
Expand Down
1 change: 0 additions & 1 deletion loot/interp.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
(match (interp-match-pat p v r)
[#f (interp-match v ps es r ds)]
[r (interp-env e r ds)])]))

;; Pat Value Env -> [Maybe Env]
(define (interp-match-pat p v r)
(match p
Expand Down