Skip to content

Commit

Permalink
ps: Fix ps* interop
Browse files Browse the repository at this point in the history
* Simplify postscript code parsing by using the `cvx` (convert to
  executable) function.
* Tweak the test cases to match reality (returns list of stack operands,
  or nil if stack is empty after exec).
  • Loading branch information
dubek committed Mar 30, 2016
1 parent eb67113 commit 7bc5e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file modified ps/stepA_mal.ps
Binary file not shown.
4 changes: 3 additions & 1 deletion ps/tests/stepA_mal.mal
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
;=>(true)

(ps* "/sym")
;=>sym
;=>(sym)

(ps* "1 1 eq { (yep) }{ (nope) } ifelse")
;=>("yep")

(ps* "1 0 eq { (yep) }{ (nope) } ifelse")
;=>("nope")

(ps* "1 2 3 pop pop pop")
;=>nil

0 comments on commit 7bc5e95

Please sign in to comment.