1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 13:00:26 +02:00

Add assignment js-type to (language javascript)

* module/language/javascript.scm
  (assign): new js-type
  (print-exp, unparse-js): Handle case.
* module/language/javascript/simplify.scm (flatten-blocks):  Handle case.
This commit is contained in:
Ian Price 2017-08-27 22:18:40 +01:00
parent c5fa12f344
commit d4ef33f6cf
2 changed files with 13 additions and 0 deletions

View file

@ -15,6 +15,8 @@
(fold-right flatten '() stmts))
(define (flatten-exp exp)
(match exp
(($ assign id exp)
(make-assign id (flatten-exp exp)))
(($ const c) exp)
(($ new exp)
(make-new (flatten-exp exp)))