Merge pull request #29 from DuckNoodleSoup/master
Changed :output to :print
This commit is contained in:
commit
890c2de152
@ -71,9 +71,9 @@
|
||||
program
|
||||
(assoc state/empty-state :input {:in1 (first input)
|
||||
:in2 (last input)}
|
||||
:output '(""))
|
||||
:print '(""))
|
||||
(:step-limit argmap))
|
||||
:output))
|
||||
:print))
|
||||
inputs)
|
||||
parsed-outputs (map (fn [output]
|
||||
(try (read-string output)
|
||||
|
@ -75,9 +75,9 @@
|
||||
:in2 (get input 1)
|
||||
:in3 (get input 2)
|
||||
:in4 (get input 3)}
|
||||
:output '(""))
|
||||
:print '(""))
|
||||
(:step-limit argmap))
|
||||
:output))
|
||||
:print))
|
||||
inputs)
|
||||
errors (map (fn [correct-output output]
|
||||
(let [parsed-output (try (read-string output)
|
||||
|
@ -31,9 +31,9 @@
|
||||
:print_newline
|
||||
^{:stacks [:print]}
|
||||
(fn [state]
|
||||
(let [current-output (state/peek-stack state :output)
|
||||
popped-state (state/pop-stack state :output)]
|
||||
(state/push-to-stack popped-state :output (str current-output \newline)))))
|
||||
(let [current-output (state/peek-stack state :print)
|
||||
popped-state (state/pop-stack state :print)]
|
||||
(state/push-to-stack popped-state :print (str current-output \newline)))))
|
||||
|
||||
(def _print
|
||||
^{:stacks [:print]
|
||||
@ -46,10 +46,10 @@
|
||||
(char? top-item))
|
||||
top-item
|
||||
(pr-str top-item))
|
||||
current-output (state/peek-stack state :output)
|
||||
popped-state (state/pop-stack (state/pop-stack state stack) :output)]
|
||||
current-output (state/peek-stack state :print)
|
||||
popped-state (state/pop-stack (state/pop-stack state stack) :print)]
|
||||
(state/push-to-stack popped-state
|
||||
:output
|
||||
:print
|
||||
(str current-output top-item-str))))))
|
||||
|
||||
(generate-instructions
|
||||
|
@ -7,8 +7,9 @@
|
||||
:exec '()
|
||||
:float '()
|
||||
:input {}
|
||||
:output {}
|
||||
:integer '()
|
||||
:output '("")
|
||||
:print '("")
|
||||
:string '()
|
||||
:vector_boolean '()
|
||||
:vector_float '()
|
||||
|
Loading…
x
Reference in New Issue
Block a user