Add missing reserved words so compiler knows to use array syntax:

* await
* null
* true
* false

IE 8 was failing to compile Handlebars-generated source code
because it had helpers.null.

I came up with this list by diffing
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords
against the ones Handlebars already had.

I added two corresponding tests for nameLookup.
This commit is contained in:
Matthew Flaschen
2015-01-17 17:08:01 -05:00
parent c5fe2527b3
commit c9d723e0fb
2 changed files with 8 additions and 1 deletions
@@ -1025,7 +1025,8 @@ var reservedWords = (
" class float package throws" +
" const goto private transient" +
" debugger implements protected volatile" +
" double import public let yield"
" double import public let yield await" +
" null true false"
).split(" ");
var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};