mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Simplify consts generation slightly.
This commit is contained in:
parent
59a1afce57
commit
c4044d863e
@ -144,9 +144,10 @@ var opTypeNames = {
|
||||
var keywords = {__proto__: null};
|
||||
|
||||
// Define const END, etc., based on the token names. Also map name to index.
|
||||
var consts;
|
||||
var consts = "const ";
|
||||
for (var i = 0, j = tokens.length; i < j; i++) {
|
||||
consts = (!consts) ? "const " : consts + ", ";
|
||||
if (i > 0)
|
||||
consts += ", ";
|
||||
var t = tokens[i];
|
||||
if (/^[a-z]/.test(t)) {
|
||||
consts += t.toUpperCase();
|
||||
|
Loading…
Reference in New Issue
Block a user