kripken/emscripten — pull request #935 by brk (2013-03-08 23:02:41+00:00)
Title: toNiceIdent() doesn't handle exclamation marks

Pull request corresponding to issue #896... attempt two.

Alon, I sincerely apologize for any mail-spam this has caused.

I ran the full test suite with this patch applied the other night, and the only errors were related to not having `scons` or the `CRUNCH` package installed.

With the augmented test suite but not the tweak to `src/parseTools.js` :

```
$ python tests/runner.py other.test_emcc
Running Emscripten tests...
(Emscripten: Running sanity checks)
test_emcc (__main__.other) ...
/tmp/emscripten_test_other_oKQpMu/a.out.js:2175
var $_!retval_;
^
SyntaxError: Unexpected token !
at Module._compile (module.js:437:25)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
ERROR

======================================================================
ERROR: test_emcc (__main__.other)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/runner.py", line 8633, in test_emcc
self.assertContained('hello, world!', run_js('a.out.js'))
File "tests/runner.py", line 327, in assertContained
additional_info
Exception: Expected to find 'hello, world!' in '', diff:

--- expected
+++ actual
@@ -1 +1 @@
-hello, world!
+

```

With the whole patch:

```
$ python tests/runner.py other.test_emcc
Running Emscripten tests...
(Emscripten: Running sanity checks)
test_emcc (__main__.other) ... hello_world.c False
hello_malloc.cpp True
['-o', 'something.js'] 0 None 0 1
['-o', 'something.js', '-O0'] 0 None 0 0
['-o', 'something.js', '-O1'] 1 None 0 0
(etc)
```