Skip to content

Commit 0f2f161

Browse files
committed
Blockly export: Implement Next dans Si.
1 parent 7bae545 commit 0f2f161

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

microalg_export_blockly.l

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@
127127
kw_alors (cadr inputs)
128128
splitted (split (cddr inputs) 'Sinon)
129129
bloc_vrai (car splitted)
130-
bloc_faux (cadr splitted))
130+
bloc_faux (cadr splitted)
131+
# !next est le dernier de la liste inputs, si son car vaut Next.
132+
!next (let !last (last inputs) (if (= (car !last) 'Next) !last)))
131133
(pack "<block type=\"si\">"
132134
(if (n0 (length bloc_faux)) "<mutation else=\"1\"></mutation>")
133135
"<value name=\"COND\">"
@@ -140,6 +142,7 @@
140142
"<statement name=\"SINON\">"
141143
(eval (insertion_next bloc_faux))
142144
"</statement>"))
145+
(eval !next)
143146
"</block>")
144147
))
145148
(de Texte (content)

0 commit comments

Comments
 (0)