Comparing version 4.1.1 to 4.1.2
{ | ||
"name": "apg-js", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "JavaScript APG, an ABNF Parser Generator", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,2 +19,4 @@ # JavaScript APG | ||
Version 4.1.2 simply replaces five instances of "module.exports = function exports(" with "module.exports = function exfn(". ESLint requires a name here but the name "exports" causes conflicts in some bundlers. | ||
## Overview | ||
@@ -21,0 +23,0 @@ |
@@ -135,3 +135,3 @@ /* ************************************************************************************* | ||
} | ||
/* display character as hexidecimal value */ | ||
/* display character as hexadecimal value */ | ||
html += `\\x${apglib.utils.charToHex(ch)}`; | ||
@@ -138,0 +138,0 @@ } |
@@ -16,3 +16,3 @@ /* ************************************************************************************* | ||
// by the parser generator primarily for error reporting. | ||
module.exports = function exports(chars, errors, strict, trace) { | ||
module.exports = function exfn(chars, errors, strict, trace) { | ||
const thisFileName = 'scanner.js: '; | ||
@@ -19,0 +19,0 @@ const apglib = require('../apg-lib/node-exports'); |
@@ -10,3 +10,3 @@ /* ************************************************************************************* | ||
// for the grammar file these callback functions are based on. | ||
module.exports = function exports() { | ||
module.exports = function exfn() { | ||
const apglib = require('../apg-lib/node-exports'); | ||
@@ -62,3 +62,3 @@ const id = apglib.ids; | ||
}; | ||
/* converts text hexidecimal numbers from, e.g. %xff, to an integer */ | ||
/* converts text hexadecimal numbers from, e.g. %xff, to an integer */ | ||
const hexnum = function hexnum(chars, beg, len) { | ||
@@ -65,0 +65,0 @@ let num = 0; |
@@ -5,3 +5,3 @@ /* ************************************************************************************* | ||
* ********************************************************************************* */ | ||
module.exports = (function exports() { | ||
module.exports = (function exfn() { | ||
const thisFileName = 'show-rules.js'; | ||
@@ -8,0 +8,0 @@ // Display the rules. |
@@ -10,3 +10,3 @@ /* eslint-disable func-names */ | ||
// for the grammar file these callback functions are based on. | ||
module.exports = function exports() { | ||
module.exports = function exfn() { | ||
const thisFileName = 'syntax-callbacks.js: '; | ||
@@ -13,0 +13,0 @@ const apglib = require('../apg-lib/node-exports'); |
@@ -16,3 +16,3 @@ /* ************************************************************************************* | ||
module.exports = function exports() { | ||
module.exports = function exfn() { | ||
'use strict;'; | ||
@@ -19,0 +19,0 @@ |
@@ -448,3 +448,3 @@ /* eslint-disable guard-for-in */ | ||
- "decimal", display character arrays as decimal integers | ||
- "hexidecimal", display character arrays as hexidecimal (\xHH) integers | ||
- "hexadecimal", display character arrays as hexadecimal (\xHH) integers | ||
- "unicode", display character arrays as unicode (\uHH) integers | ||
@@ -451,0 +451,0 @@ return resultFuncs.u.expToText(this, mode); |
@@ -369,3 +369,3 @@ /* eslint-disable no-underscore-dangle */ | ||
case MODE_HEX: | ||
txt = 'hexidecimal'; | ||
txt = 'hexadecimal'; | ||
break; | ||
@@ -372,0 +372,0 @@ case MODE_DEC: |
@@ -187,3 +187,3 @@ /* eslint-disable guard-for-in */ | ||
// "decimal" | ||
// "hexidecimal" | ||
// "hexadecimal" | ||
// "unicode" | ||
@@ -194,3 +194,3 @@ // ``` | ||
let caption = 'decimal integer character codes'; | ||
if (typeof mode === 'string' && modeArg.length >= 3) { | ||
if (typeof modeArg === 'string' && modeArg.length >= 3) { | ||
const mode = modeArg.slice(0, 3).toLowerCase(); | ||
@@ -202,3 +202,3 @@ if (mode === 'asc') { | ||
display = utils.charsToHex; | ||
caption = 'hexidecimal integer character codes'; | ||
caption = 'hexadecimal integer character codes'; | ||
} else if (mode === 'uni') { | ||
@@ -205,0 +205,0 @@ display = utils.charsToUnicode; |
@@ -674,3 +674,3 @@ /* eslint-disable func-names */ | ||
case MODE_HEX: | ||
modeName = 'hexidecimal'; | ||
modeName = 'hexadecimal'; | ||
break; | ||
@@ -1137,3 +1137,3 @@ case MODE_DEC: | ||
// Translate the trace records to HTML format. | ||
// - *modearg* - can be `"ascii"`, `"decimal"`, `"hexidecimal"` or `"unicode"`. | ||
// - *modearg* - can be `"ascii"`, `"decimal"`, `"hexadecimal"` or `"unicode"`. | ||
// Determines the format of the string character code display. | ||
@@ -1140,0 +1140,0 @@ // - *caption* - optional caption for the HTML table. |
@@ -384,3 +384,3 @@ /* eslint-disable func-names */ | ||
]; | ||
// Translates a single character to hexidecimal with leading zeros for 2, 4, or 8 digit display. | ||
// Translates a single character to hexadecimal with leading zeros for 2, 4, or 8 digit display. | ||
exports.charToHex = function (char) { | ||
@@ -423,3 +423,3 @@ let ch = char.toString(16).toUpperCase(); | ||
}; | ||
// Translates a sub-array of character codes to hexidecimal display format. | ||
// Translates a sub-array of character codes to hexadecimal display format. | ||
exports.charsToHex = function (chars, beg, len) { | ||
@@ -426,0 +426,0 @@ let ret = ''; |
@@ -36,7 +36,6 @@ /* ************************************************************************************* | ||
function logErrors(api, header) { | ||
console.log('\n'); | ||
console.log(`${header}:`); | ||
console.log(api.errorsToAscii()); | ||
console.log('\nORIGINAL GRAMMAR:'); | ||
console.log(api.linesToAscii()); | ||
console.log(`\n${header}:`); | ||
console.log(api.errorsToAscii()); | ||
} | ||
@@ -43,0 +42,0 @@ try { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1451628
89
15752