diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-02-24 00:29:26 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-02-24 00:29:26 -0800 |
commit | 3d2845f2944ef92a12b9004624683b7434423f10 (patch) | |
tree | 91b07e60a0ff2c8d6f9ec13b62f42d66d91d0026 | |
parent | eacb2ce45868c952346ae2efea64dc759e50488f (diff) | |
download | mu-3d2845f2944ef92a12b9004624683b7434423f10.tar.gz |
829 - warn if I forgot to freeze a function
-rw-r--r-- | mu.arc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mu.arc b/mu.arc index 1dbcb4ae..42efca71 100644 --- a/mu.arc +++ b/mu.arc @@ -446,11 +446,12 @@ ; routines consist of instrs ; instrs consist of oargs, op and args (def parse-instr (instr) -;? (prn instr) (iflet delim (pos '<- instr) - (list (cut instr 0 delim) ; oargs - (v (instr (+ delim 1))) ; op - (cut instr (+ delim 2))) ; args + (do (when (atom (instr (+ delim 1))) + (err "operator not tokenized in @instr; maybe you need to freeze functions*?")) + (list (cut instr 0 delim) ; oargs + (v (instr (+ delim 1))) ; op + (cut instr (+ delim 2)))) ; args (list nil (v car.instr) cdr.instr))) (def metadata (operand) |