Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
NORMAL added a build script, some bugfixes to ensure that google clos…
…ure compiler works with the generated code.
  • Loading branch information
VincentToups committed Aug 24, 2013
1 parent 2eb3b0e commit f374703
Show file tree
Hide file tree
Showing 16 changed files with 3,052 additions and 1,164 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
*.elc
.#*
*.jar
1 change: 1 addition & 0 deletions jstest.js
@@ -0,0 +1 @@
(function(x){ arguments = x; return arguments;})([1,2,3])
1 change: 1 addition & 0 deletions jstests.min.js
@@ -0,0 +1 @@
(function(a){return arguments=a})([1,2,3]);
11 changes: 6 additions & 5 deletions node-scripts/test-module/a-module.js
@@ -1,11 +1,12 @@
define([], (function () {
var currentModule97939 = {
var currentModule27135 = {

};
var setModuleObject = (function (value) {
currentModule97939 = value;
currentModule27135 = value;
});
(function (arguments) {
(function (arguments27150) {
arguments = arguments27150;
// _current-module
// macro - no dynamic value.
;
Expand All @@ -18,7 +19,7 @@ define([], (function () {
// define-pattern+
// macro - no dynamic value.
;
currentModule97939.quotedValue = "someValue";
currentModule27135.quotedValue = "someValue";
}).call(this, (((((typeof arguments))===("undefined")))?(undefined) : (arguments)));
return currentModule97939;
return currentModule27135;
}))
12 changes: 12 additions & 0 deletions node-scripts/tests.gazelle
Expand Up @@ -79,5 +79,17 @@
(=== 'some-value
quoted-value))

(define-test "arguments preserved in _let"
(=== 10
(.. (lambda () (_let ((x 0)) [arguments 0])) (call undefined 10 11 12))))

(define-test "arguments preserved in progn"
(=== 10
(.. (lambda ()
(progn
[arguments 0]))
(call undefined 10 11 12))))


(run-tests))

719 changes: 382 additions & 337 deletions node-scripts/tests.js

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions prim.el
Expand Up @@ -586,13 +586,7 @@ manglings. Additionally, dashed ids are replaced by camel case."

(defun-match prim:transcode
((list-rest '_.
(and expr
(! (or (list hd (tail tl))
[hd (tail tl)])
actually
(format (concat "_. expressions must begin with a symbol, "
"a function call, or an array access. Got %S.")
actually)))
expr
tail-of-dot-expr))
(prim:transcode expr)
(if tail-of-dot-expr
Expand Down

0 comments on commit f374703

Please sign in to comment.