Skip to content

Commit

Permalink
asm-llvm: add _ to exported tokTypes to match upstream acorn.
Browse files Browse the repository at this point in the history
This is upstream commit
acornjs/acorn@6fe1239
  • Loading branch information
cscott committed Jun 14, 2013
1 parent d3ba058 commit 365abac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions asm-llvm.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,14 +504,14 @@ define(['text!asm-llvm.js'], function asm_llvm(asm_llvm_source) {
// tokenizer.

asm_llvm_module.tokTypes = {
bracketL: _bracketL, bracketR: _bracketR, braceL: _braceL,
braceR: _braceR, parenL: _parenL, parenR: _parenR, comma: _comma,
semi: _semi, colon: _colon, dot: _dot, question: _question,
slash: _slash, eq: _eq, name: _name, eof: _eof, num: _num,
regexp: _regexp, string: _string, dotnum: _dotnum
_bracketL: _bracketL, _bracketR: _bracketR, _braceL: _braceL,
_braceR: _braceR, _parenL: _parenL, _parenR: _parenR, _comma: _comma,
_semi: _semi, _colon: _colon, _dot: _dot, _question: _question,
_slash: _slash, _eq: _eq, _name: _name, _eof: _eof, _num: _num,
_regexp: _regexp, _string: _string, _dotnum: _dotnum
};
Object.keys(keywordTypes).forEach(function(kw) {
asm_llvm_module.tokTypes[kw] = keywordTypes[kw];
asm_llvm_module.tokTypes['_' + kw] = keywordTypes[kw];
});

// This is a trick taken from Esprima. It turns out that, on
Expand Down
2 changes: 1 addition & 1 deletion benchmark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ if (typeof window !== 'undefined') {
window.tree.push(tree);
}) : tokenizeOnly ? (function() {
var getToken = ts_asm_llvm.tokenize(source);
var _eof = ts_asm_llvm.tokTypes.eof;
var _eof = ts_asm_llvm.tokTypes._eof;
var count = 0;
while (true) {
var t = getToken();
Expand Down

0 comments on commit 365abac

Please sign in to comment.