mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 15:27:36 +02:00
Build-out validation
This commit is contained in:
parent
da4ffd84a3
commit
dba849ae62
1 changed files with 13 additions and 5 deletions
|
@ -24,15 +24,23 @@
|
||||||
(error "Too many arguments" exp)))))
|
(error "Too many arguments" exp)))))
|
||||||
|
|
||||||
(define (check-define exp)
|
(define (check-define exp)
|
||||||
'todo)
|
(let ((args (length exp)))
|
||||||
|
(cond
|
||||||
|
((< args 2)
|
||||||
|
(error "Not enough arguments" exp)))))
|
||||||
|
|
||||||
(define (check-set exp)
|
(define (check-set exp)
|
||||||
'todo)
|
(let ((args (length exp)))
|
||||||
|
(cond
|
||||||
|
((< args 2)
|
||||||
|
(error "Not enough arguments" exp)))))
|
||||||
|
|
||||||
(define (check-lambda exp)
|
(define (check-lambda exp)
|
||||||
;(difference (reduce union (map search (lambda->exp exp)) '())
|
(let ((num-args (length exp)))
|
||||||
; (lambda-formals->list exp))
|
(cond
|
||||||
'todo)
|
((< num-args 2)
|
||||||
|
(error "Not enough arguments" exp))))
|
||||||
|
(lambda-formals-type exp)) ;; Validates type information
|
||||||
|
|
||||||
;; TODO: could check primitives, etc
|
;; TODO: could check primitives, etc
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue