Skip to content

Commit

Permalink
crook
Browse files Browse the repository at this point in the history
  • Loading branch information
dvanhorn committed Dec 2, 2024
1 parent d160751 commit fbac811
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 22 deletions.
5 changes: 0 additions & 5 deletions iniquity-plus/assert.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@

;; Register -> Asm


(define assert-char
(assert-type mask-char type-char))




(define assert-box
(assert-type ptr-mask type-box))
(define assert-cons
Expand Down
3 changes: 1 addition & 2 deletions iniquity-plus/compile-stdin.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
;; emit asm code on stdout
(define (main)
(read-line) ; ignore #lang racket line
(asm-display (compile
(apply parse-closed (read-all)))))
(asm-display (compile (apply parse-closed (read-all)))))

3 changes: 1 addition & 2 deletions iniquity-plus/interp-stdin.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
;; print result on stdout
(define (main)
(read-line) ; ignore #lang racket line
(println (interp
(apply parse-closed (read-all)))))
(println (interp (apply parse-closed (read-all)))))

3 changes: 2 additions & 1 deletion iniquity-plus/test/parse.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
(begin ; Abscond
(check-equal? (parse 42) (p (Lit 42)))
(check-equal? (parse -1) (p (Lit -1))))
(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))
(begin ; Blackmail
(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))))
(begin ; Dupe
(check-equal? (parse '(if (zero? 1) 2 3))
(p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3))))
Expand Down
5 changes: 0 additions & 5 deletions knock-plus/assert.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@

;; Register -> Asm


(define assert-char
(assert-type mask-char type-char))




(define assert-box
(assert-type ptr-mask type-box))
(define assert-cons
Expand Down
3 changes: 1 addition & 2 deletions knock-plus/compile-stdin.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
;; emit asm code on stdout
(define (main)
(read-line) ; ignore #lang racket line
(asm-display (compile
(apply parse-closed (read-all)))))
(asm-display (compile (apply parse-closed (read-all)))))

3 changes: 1 addition & 2 deletions knock-plus/interp-stdin.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
;; print result on stdout
(define (main)
(read-line) ; ignore #lang racket line
(println (interp
(apply parse-closed (read-all)))))
(println (interp (apply parse-closed (read-all)))))

3 changes: 1 addition & 2 deletions knock-plus/parse.rkt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#lang racket
(provide parse parse-closed parse-e parse-define
parse-pattern)
(provide parse parse-closed parse-e parse-define parse-pattern)
(require "ast.rkt")

;; [Listof S-Expr] -> Prog
Expand Down
3 changes: 2 additions & 1 deletion knock-plus/test/parse.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
(begin ; Abscond
(check-equal? (parse 42) (p (Lit 42)))
(check-equal? (parse -1) (p (Lit -1))))
(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))
(begin ; Blackmail
(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))))
(begin ; Dupe
(check-equal? (parse '(if (zero? 1) 2 3))
(p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3))))
Expand Down

0 comments on commit fbac811

Please sign in to comment.