1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

further ecmascript work

* libguile/vm-i-system.c (drop, return): Declare drop and return as
  popping one arg from the stack.

* module/language/ghil/compile-glil.scm:
* module/language/glil/compile-assembly.scm (make-meta): Adjust so that
  we declare 'drop and 'return calls as popping one arg from the stack.

* module/language/ecmascript/compile-ghil.scm (comp, comp-body): Flesh
  out a bit more. Most significantly, scoping within functions obeys
  javascript semantics better, modulo bits about with() forms.

* module/language/ecmascript/impl.scm: Define some runtime helper
  routines.
* module/language/Makefile.am (SOURCES): Add impl.scm.

* module/language/ecmascript/parse.scm (parse-ecmascript): Minor tweaks.

* module/language/ecmascript/tokenize.scm (read-identifier): Identifiers
  now read as symbols, not strings.
This commit is contained in:
Andy Wingo 2009-02-19 13:55:55 +01:00
parent 8fa6886d7a
commit 131f7d6c71
8 changed files with 271 additions and 18 deletions

View file

@ -225,7 +225,7 @@
=> (lambda (x) `(,x . #f)))
((assoc-ref *future-reserved-words* word)
(error "word is reserved for the future, dude." word))
(else `(Identifier . ,word))))
(else `(Identifier . ,(string->symbol word)))))
(begin (read-char port)
(lp (peek-char port) (cons c chars))))))