diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-15 16:10:53 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-15 16:10:53 -0700 |
commit | a5e53573b80332fb68c6f35be130988e50fb4962 (patch) | |
tree | 4f9763e0bda7df3d088f11955e07448f66e9dd80 /src | |
parent | 2944f9054d7932ef44ccc4b1c501d43e59488319 (diff) |
cache ',' token
Diffstat (limited to 'src')
-rw-r--r-- | src/intertyper.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intertyper.js b/src/intertyper.js index 50902806..9414a1d4 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -6,7 +6,7 @@ var fastPaths = 0, slowPaths = 0; var tokenCache = {}; -['i32', 'label', ';', '4', '0', '1', '2', '255', 'align', 'i8*', 'i8', 'i16', 'getelementptr', 'inbounds', 'unnamed_addr', 'x', 'load', 'preds', 'br', 'i32*', 'i1', 'store', '<label>', 'constant', 'c', 'private', 'null', 'internal', 'to', 'bitcast', 'define', 'nounwind', 'nocapture', '%this', 'call', '...'].forEach(function(text) { tokenCache[text] = { text: text } }); +[',', 'i32', 'label', ';', '4', '0', '1', '2', '255', 'align', 'i8*', 'i8', 'i16', 'getelementptr', 'inbounds', 'unnamed_addr', 'x', 'load', 'preds', 'br', 'i32*', 'i1', 'store', '<label>', 'constant', 'c', 'private', 'null', 'internal', 'to', 'bitcast', 'define', 'nounwind', 'nocapture', '%this', 'call', '...'].forEach(function(text) { tokenCache[text] = { text: text } }); //var tokenCacheMisses = {}; @@ -110,7 +110,7 @@ function tokenize(text, lineNum, indent) { if (totalEnclosing == 0 && quotes == 0) { makeToken(lineText.substring(start, i)); start = i+1; - tokens.push({ text: ',' }); // XXX + tokens.push(tokenCache[',']); } break; default: |