Skip to content

Commit

Permalink
regenerated library files (zaach/jison-lex#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
GerHobbelt committed Dec 13, 2017
1 parent 68420ac commit 5cb5cd4
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 20 deletions.
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/cli-cjs-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -7659,8 +7659,18 @@ function prepareRules(dict, actions, caseHelper, tokens, startConditions, opts)
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/cli-cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9969,8 +9969,18 @@ function prepareRules(dict, actions, caseHelper, tokens, startConditions, opts)
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/cli-es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -9965,8 +9965,18 @@ function prepareRules(dict, actions, caseHelper, tokens, startConditions, opts)
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/cli-umd-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -7660,8 +7660,18 @@ function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defi
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/cli-umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -9971,8 +9971,18 @@ function prepareRules(dict, actions, caseHelper, tokens, startConditions, opts)
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/regexp-lexer-cjs-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -7655,8 +7655,18 @@ function prepareRules(dict, actions, caseHelper, tokens, startConditions, opts)
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/regexp-lexer-cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9965,8 +9965,18 @@ function prepareRules(dict, actions, caseHelper, tokens, startConditions, opts)
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/regexp-lexer-es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -9961,8 +9961,18 @@ function prepareRules(dict, actions, caseHelper, tokens, startConditions, opts)
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/regexp-lexer-umd-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -7656,8 +7656,18 @@ function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defi
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down
14 changes: 12 additions & 2 deletions packages/jison-lex/dist/regexp-lexer-umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -9967,8 +9967,18 @@ function prepareRules(dict, actions, caseHelper, tokens, startConditions, opts)
newRules.push(m);
action = rule[1];
if (typeof action === 'function') {
// TODO: also cope with Arrow Functions (and inline those as well?) -- see also https://github.com/zaach/jison-lex/issues/23
action = String(action).replace(/^\s*function\s*\(\)\s?\{/, '').replace(/\}\s*$/, '');
// Also cope with Arrow Functions (and inline those as well?).
// See also https://github.com/zaach/jison-lex/issues/23
action = String(action);
if (action.match(/^\s*function\s*\(\)\s*\{/)) {
action = action.replace(/^\s*function\s*\(\)\s*\{/, '').replace(/\}\s*$/, '');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*[^\s\r\n\{]/)) {
// () => 'TOKEN' --> return 'TOKEN'
action = action.replace(/^\s*\(\)\s*=>/, 'return ');
} else if (action.match(/^\s*\(\)\s*=>[\s\r\n]*\{/)) {
// () => { statements } --> statements (ergo: 'inline' the given function)
action = action.replace(/^\s*\(\)\s*=>[\s\r\n]*\{/, '').replace(/\}\s*$/, '');
}
}
action = action.replace(/return\s*'((?:\\'|[^']+)+)'/g, tokenNumberReplacement);
action = action.replace(/return\s*"((?:\\"|[^"]+)+)"/g, tokenNumberReplacement);
Expand Down

0 comments on commit 5cb5cd4

Please sign in to comment.