diff --git a/package-lock.json b/package-lock.json index c39b6e90e..71e3da84a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,9 +35,9 @@ "@typescript-eslint/eslint-plugin": "^8.6.0", "@typescript-eslint/parser": "^8.6.0", "@unified-latex/unified-latex-types": "1.8.0", - "@unified-latex/unified-latex-util-arguments": "1.8.0", - "@unified-latex/unified-latex-util-parse": "1.8.0", - "@unified-latex/unified-latex-util-to-string": "1.8.0", + "@unified-latex/unified-latex-util-arguments": "1.8.1", + "@unified-latex/unified-latex-util-parse": "1.8.1", + "@unified-latex/unified-latex-util-to-string": "1.8.1", "@vscode/test-electron": "^2.4.1", "@vscode/vsce": "^3.1.0", "c8": "^10.1.2", @@ -1515,19 +1515,19 @@ } }, "node_modules/@unified-latex/unified-latex-ctan": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-ctan/-/unified-latex-ctan-1.8.0.tgz", - "integrity": "sha512-Ur2K23+iK4H5gqL9wLcMiWmaMu1110olwpFihonxEPEYnHJgWVAGZ9sWmASKEPhaPU+MPFWebJDKCWoOWPHIVQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-ctan/-/unified-latex-ctan-1.8.1.tgz", + "integrity": "sha512-doCNkEpfBClt6jVeN88d8nt3a4xt30vWHY7rKKY9JcvQC1S9I9NGsr3ebPVGYmT0sxk6gBvohPVc5Kddo027nQ==", "dev": true, "license": "MIT", "dependencies": { "@unified-latex/unified-latex-builder": "^1.8.0", "@unified-latex/unified-latex-types": "^1.8.0", - "@unified-latex/unified-latex-util-argspec": "^1.8.0", - "@unified-latex/unified-latex-util-arguments": "^1.8.0", + "@unified-latex/unified-latex-util-argspec": "^1.8.1", + "@unified-latex/unified-latex-util-arguments": "^1.8.1", "@unified-latex/unified-latex-util-comments": "^1.8.0", "@unified-latex/unified-latex-util-match": "^1.8.0", - "@unified-latex/unified-latex-util-pegjs": "^1.8.0", + "@unified-latex/unified-latex-util-pegjs": "^1.8.1", "@unified-latex/unified-latex-util-print-raw": "^1.8.0", "@unified-latex/unified-latex-util-render-info": "^1.8.0", "@unified-latex/unified-latex-util-replace": "^1.8.0", @@ -1539,18 +1539,18 @@ } }, "node_modules/@unified-latex/unified-latex-prettier": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-prettier/-/unified-latex-prettier-1.8.0.tgz", - "integrity": "sha512-pNeuMODsae9agMH1BH8GR+6zlCRArAFQjm++jFZczQ62inQltDgdwGanYwFM8JphBooATVy1L0z4Zo4bvmK5UQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-prettier/-/unified-latex-prettier-1.8.1.tgz", + "integrity": "sha512-Zc9t4Y+83xUusrh9YCvQ353nwSgI8kWKyXEJJW0upHirICPx9FX6wOrmfD9ifOIarOcwZ2mpiMK8BM6fdejTPA==", "dev": true, "license": "MIT", "dependencies": { - "@unified-latex/unified-latex-ctan": "^1.8.0", + "@unified-latex/unified-latex-ctan": "^1.8.1", "@unified-latex/unified-latex-types": "^1.8.0", - "@unified-latex/unified-latex-util-align": "^1.8.0", + "@unified-latex/unified-latex-util-align": "^1.8.1", "@unified-latex/unified-latex-util-match": "^1.8.0", - "@unified-latex/unified-latex-util-parse": "^1.8.0", - "@unified-latex/unified-latex-util-pgfkeys": "^1.8.0", + "@unified-latex/unified-latex-util-parse": "^1.8.1", + "@unified-latex/unified-latex-util-pgfkeys": "^1.8.1", "@unified-latex/unified-latex-util-print-raw": "^1.8.0", "@unified-latex/unified-latex-util-trim": "^1.8.0", "@unified-latex/unified-latex-util-visit": "^1.8.0", @@ -1581,37 +1581,37 @@ "license": "MIT" }, "node_modules/@unified-latex/unified-latex-util-align": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-align/-/unified-latex-util-align-1.8.0.tgz", - "integrity": "sha512-HAX3j21IYC4Bv61aZf+8uSE8MlhLe1mWOwnKohtSd8rlXcXwEtDIX7zsWvBq3ECAD/Xw5r+wQ14Ai44qiGv+7Q==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-align/-/unified-latex-util-align-1.8.1.tgz", + "integrity": "sha512-csJxLrvziRc5ZkhcRsYI7gSQBGC4fXucPtwNkTscbSIy7PfYF7BfWBPc61sb9jXQg4T4R6MLdG/Tz6Pgb6z1bw==", "dev": true, "license": "MIT", "dependencies": { "@unified-latex/unified-latex-types": "^1.8.0", "@unified-latex/unified-latex-util-match": "^1.8.0", - "@unified-latex/unified-latex-util-pegjs": "^1.8.0" + "@unified-latex/unified-latex-util-pegjs": "^1.8.1" } }, "node_modules/@unified-latex/unified-latex-util-argspec": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-argspec/-/unified-latex-util-argspec-1.8.0.tgz", - "integrity": "sha512-4YHsd46hTQ9fzAJLiFX3SfuZFO9i8qSlVZ+XApqRITae2CUi5a//+kiNwswnNjtclMFgbGwqG2Nb7dnwX0Yxvw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-argspec/-/unified-latex-util-argspec-1.8.1.tgz", + "integrity": "sha512-fEHtg0gUbqTCRQXsx21YA7C7CRZC+LJtPQmG4UCLVlwlfF4l9KZ0oxt0XWPIxV5bLj79otGR0nJEqdxMDuNtYA==", "dev": true, "license": "MIT", "dependencies": { - "@unified-latex/unified-latex-util-pegjs": "^1.8.0" + "@unified-latex/unified-latex-util-pegjs": "^1.8.1" } }, "node_modules/@unified-latex/unified-latex-util-arguments": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-arguments/-/unified-latex-util-arguments-1.8.0.tgz", - "integrity": "sha512-yHyk3O+pH6rC+LTIuXubklC2jIaq6FSMixzrHV06h2/TTYJWYWHDYRb4ppdqT3IXfJ4OeMTvXTTBtmMWJP9mww==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-arguments/-/unified-latex-util-arguments-1.8.1.tgz", + "integrity": "sha512-BrU+MOVAzrViiS3he5f9I8l3ZVL5hUEEFaFM8kvrzX3EGEfwjiFTpJu6Z0xzuYvIIxi9hkoVMr54MBFRmE1+tA==", "dev": true, "license": "MIT", "dependencies": { "@unified-latex/unified-latex-builder": "^1.8.0", "@unified-latex/unified-latex-types": "^1.8.0", - "@unified-latex/unified-latex-util-argspec": "^1.8.0", + "@unified-latex/unified-latex-util-argspec": "^1.8.1", "@unified-latex/unified-latex-util-match": "^1.8.0", "@unified-latex/unified-latex-util-render-info": "^1.8.0", "@unified-latex/unified-latex-util-scan": "^1.8.0", @@ -1644,14 +1644,14 @@ } }, "node_modules/@unified-latex/unified-latex-util-environments": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-environments/-/unified-latex-util-environments-1.8.0.tgz", - "integrity": "sha512-yO6PMMOiDIo0Z+aiqvozNCWTWKnfBp7Y29nTTtD2NtRrlROct4s8sPO5wnWClNmSyxk2B6gIhCuTwREC9JnHHQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-environments/-/unified-latex-util-environments-1.8.1.tgz", + "integrity": "sha512-UFn6m9jbPzQm+pj/Vm46VcJ3QnUJv73JsEcRYKI8GOh7gmHKFN+hWUHinQ/IPD5da7m10A2o9eGWd4So5E5QwQ==", "dev": true, "license": "MIT", "dependencies": { "@unified-latex/unified-latex-types": "^1.8.0", - "@unified-latex/unified-latex-util-arguments": "^1.8.0", + "@unified-latex/unified-latex-util-arguments": "^1.8.1", "@unified-latex/unified-latex-util-match": "^1.8.0", "@unified-latex/unified-latex-util-print-raw": "^1.8.0", "@unified-latex/unified-latex-util-render-info": "^1.8.0", @@ -1671,19 +1671,19 @@ } }, "node_modules/@unified-latex/unified-latex-util-parse": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-parse/-/unified-latex-util-parse-1.8.0.tgz", - "integrity": "sha512-I7yvI3WJX9kFpC07rvCI0q2igZ3z1ng4FzoFIcXxsjfkCakPAx+AQi0Evh10lkem3Ip1LfTZvYI1Db30TaRytw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-parse/-/unified-latex-util-parse-1.8.1.tgz", + "integrity": "sha512-5fbVouRZXWtIYth5awwAd0zbO+aYEmyXGGlUeczglN8QRudhaiKe7X/ozqtBs0GnZiPeu3FbFRSelErKivVYdQ==", "dev": true, "license": "MIT", "dependencies": { - "@unified-latex/unified-latex-ctan": "^1.8.0", + "@unified-latex/unified-latex-ctan": "^1.8.1", "@unified-latex/unified-latex-types": "^1.8.0", - "@unified-latex/unified-latex-util-arguments": "^1.8.0", + "@unified-latex/unified-latex-util-arguments": "^1.8.1", "@unified-latex/unified-latex-util-catcode": "^1.8.0", - "@unified-latex/unified-latex-util-environments": "^1.8.0", + "@unified-latex/unified-latex-util-environments": "^1.8.1", "@unified-latex/unified-latex-util-match": "^1.8.0", - "@unified-latex/unified-latex-util-pegjs": "^1.8.0", + "@unified-latex/unified-latex-util-pegjs": "^1.8.1", "@unified-latex/unified-latex-util-print-raw": "^1.8.0", "@unified-latex/unified-latex-util-trim": "^1.8.0", "@unified-latex/unified-latex-util-visit": "^1.8.0", @@ -1691,9 +1691,9 @@ } }, "node_modules/@unified-latex/unified-latex-util-pegjs": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-pegjs/-/unified-latex-util-pegjs-1.8.0.tgz", - "integrity": "sha512-SCYZq9T1THHuyl5NaVtiX6cTVDhxA2ON7qX1044hEyFfZvkU6R2bUhfaE33hZ6vYd6caF+hH53Gcky9DN5ubKw==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-pegjs/-/unified-latex-util-pegjs-1.8.1.tgz", + "integrity": "sha512-1N6WknnzKGACFCmgaEZ2j89j5C2dKhmAOCfy6moD+AMm6nUb69Xp9pJ1jDfqz+Uz9+zRo5I6ksr6q5GgmAJvtw==", "dev": true, "license": "MIT", "dependencies": { @@ -1702,15 +1702,15 @@ } }, "node_modules/@unified-latex/unified-latex-util-pgfkeys": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-pgfkeys/-/unified-latex-util-pgfkeys-1.8.0.tgz", - "integrity": "sha512-YqLRgkr1jUMlChdBBoOJ/zxGBPBRKjnOMQxl/xT3ApOxx/iZpEQEnGxo9z4IRVmIGKt7LxvSTtaJEGi1Ti2h2A==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-pgfkeys/-/unified-latex-util-pgfkeys-1.8.1.tgz", + "integrity": "sha512-VwZeUzmPgKwO2sZ9xx4Ul0Mp82DVdWg32krOlH9dzW4ZQDOBTnRtvx6LQmg9b7Iz3F2pHLYU0LCCaJlvFNBm1A==", "dev": true, "license": "MIT", "dependencies": { "@unified-latex/unified-latex-types": "^1.8.0", "@unified-latex/unified-latex-util-match": "^1.8.0", - "@unified-latex/unified-latex-util-pegjs": "^1.8.0", + "@unified-latex/unified-latex-util-pegjs": "^1.8.1", "@unified-latex/unified-latex-util-print-raw": "^1.8.0" } }, @@ -1775,13 +1775,13 @@ } }, "node_modules/@unified-latex/unified-latex-util-to-string": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-to-string/-/unified-latex-util-to-string-1.8.0.tgz", - "integrity": "sha512-yrR+E9APNOb3hrD8Tbn5WKR7zfG1377cOXR1Io3ct0dPK1/N8eT7MmPZ5mAi6MJZV7aQNAnirchd7p210RR20w==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@unified-latex/unified-latex-util-to-string/-/unified-latex-util-to-string-1.8.1.tgz", + "integrity": "sha512-5/fgMgrZa1a2tzGTC4hMB42O3oht+kV1lF9fnzsra9tLA45w69hm1BbC7GA2Q2cE1EFGCA6UTfcAaBkfY77fWA==", "dev": true, "license": "MIT", "dependencies": { - "@unified-latex/unified-latex-prettier": "^1.8.0", + "@unified-latex/unified-latex-prettier": "^1.8.1", "@unified-latex/unified-latex-types": "^1.8.0", "@unified-latex/unified-latex-util-print-raw": "^1.8.0", "prettier": "^2.8.8", diff --git a/package.json b/package.json index 13f58becd..f52a917d2 100644 --- a/package.json +++ b/package.json @@ -2678,9 +2678,9 @@ "@typescript-eslint/eslint-plugin": "^8.6.0", "@typescript-eslint/parser": "^8.6.0", "@unified-latex/unified-latex-types": "1.8.0", - "@unified-latex/unified-latex-util-arguments": "1.8.0", - "@unified-latex/unified-latex-util-parse": "1.8.0", - "@unified-latex/unified-latex-util-to-string": "1.8.0", + "@unified-latex/unified-latex-util-arguments": "1.8.1", + "@unified-latex/unified-latex-util-parse": "1.8.1", + "@unified-latex/unified-latex-util-to-string": "1.8.1", "@vscode/test-electron": "^2.4.1", "@vscode/vsce": "^3.1.0", "c8": "^10.1.2", diff --git a/resources/unified.js b/resources/unified.js index 1ef772d47..b26106f65 100644 --- a/resources/unified.js +++ b/resources/unified.js @@ -15861,6 +15861,7 @@ ${n}`; var peg$maxFailPos = 0; var peg$maxFailExpected = []; var peg$silentFails = 0; + var peg$resultsCache = {}; var peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { @@ -15955,6 +15956,12 @@ ${n}`; } function peg$parsedocument() { var s0, s1, s2; + var key = peg$currPos * 52 + 0; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = []; @@ -15971,10 +15978,17 @@ ${n}`; if (peg$silentFails === 0) { peg$fail(peg$e0); } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsemath() { var s0, s1; + var key = peg$currPos * 52 + 1; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = []; s1 = peg$parsemath_token(); @@ -15987,10 +16001,17 @@ ${n}`; if (peg$silentFails === 0) { peg$fail(peg$e1); } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsetoken() { var s0, s1, s2, s3, s4, s5; + var key = peg$currPos * 52 + 2; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$parsespecial_macro(); if (s0 === peg$FAILED) { @@ -16220,10 +16241,17 @@ ${n}`; peg$fail(peg$e2); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseparbreak() { var s0, s1, s2, s3, s4, s5, s6, s7; + var key = peg$currPos * 52 + 3; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$currPos; @@ -16377,10 +16405,17 @@ ${n}`; peg$fail(peg$e4); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsemath_token() { var s0, s1, s2, s3, s4; + var key = peg$currPos * 52 + 4; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$parsespecial_macro(); if (s0 === peg$FAILED) { @@ -16514,10 +16549,17 @@ ${n}`; peg$fail(peg$e5); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsenonchar_token() { var s0; + var key = peg$currPos * 52 + 5; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$parseescape(); if (s0 === peg$FAILED) { @@ -16567,10 +16609,17 @@ ${n}`; peg$fail(peg$e6); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsewhitespace() { var s0, s1, s2, s3, s4, s5, s6, s7; + var key = peg$currPos * 52 + 6; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$currPos; @@ -16674,10 +16723,17 @@ ${n}`; peg$fail(peg$e8); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsenumber() { var s0, s1, s2, s3, s4, s5; + var key = peg$currPos * 52 + 7; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$currPos; @@ -16807,10 +16863,17 @@ ${n}`; peg$fail(peg$e9); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsespecial_macro() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + var key = peg$currPos * 52 + 8; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parseescape(); @@ -17290,10 +17353,17 @@ ${n}`; peg$fail(peg$e11); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsesquare_bracket_argument() { var s0, s1, s2, s3, s4, s5, s6, s7; + var key = peg$currPos * 52 + 9; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 91) { s1 = peg$c4; @@ -17417,10 +17487,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseverbatim_group() { var s0, s1, s2, s3, s4, s5; + var key = peg$currPos * 52 + 10; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$parsebegin_group(); if (s1 !== peg$FAILED) { @@ -17504,10 +17581,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseverbatim_delimited_by_char() { var s0, s1, s2, s3, s4, s5, s6, s7; + var key = peg$currPos * 52 + 11; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (peg$r0.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); @@ -17683,10 +17767,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseverbatim_listings() { var s0, s1, s2, s3, s4; + var key = peg$currPos * 52 + 12; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parseescape(); @@ -17731,10 +17822,17 @@ ${n}`; peg$fail(peg$e17); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseverbatim_minted() { var s0, s1, s2, s3, s4, s5; + var key = peg$currPos * 52 + 13; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parseescape(); @@ -17796,10 +17894,17 @@ ${n}`; peg$fail(peg$e19); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseverbatim_minted_environment() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14; + var key = peg$currPos * 52 + 14; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parsebegin_env(); @@ -18007,10 +18112,17 @@ ${n}`; peg$fail(peg$e22); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseverbatim_environment() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12; + var key = peg$currPos * 52 + 15; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parsebegin_env(); @@ -18192,10 +18304,17 @@ ${n}`; peg$fail(peg$e24); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseverbatim_env_name() { var s0; + var key = peg$currPos * 52 + 16; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } if (input.substr(peg$currPos, 9) === peg$c10) { s0 = peg$c10; peg$currPos += 9; @@ -18260,10 +18379,17 @@ ${n}`; } } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsemacro() { var s0, s1, s2, s3, s4; + var key = peg$currPos * 52 + 17; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$currPos; @@ -18327,10 +18453,17 @@ ${n}`; peg$fail(peg$e31); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsegroup() { var s0, s1, s2, s3, s4, s5; + var key = peg$currPos * 52 + 18; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parsebegin_group(); @@ -18406,10 +18539,17 @@ ${n}`; peg$fail(peg$e32); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsegroup_contents_as_string() { var s0, s1; + var key = peg$currPos * 52 + 19; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$parsegroup(); if (s1 !== peg$FAILED) { @@ -18417,10 +18557,17 @@ ${n}`; s1 = peg$f47(); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseenvironment() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10; + var key = peg$currPos * 52 + 20; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parsebegin_env(); @@ -18564,10 +18711,17 @@ ${n}`; peg$fail(peg$e33); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsemath_environment() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12; + var key = peg$currPos * 52 + 21; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parsebegin_env(); @@ -18735,10 +18889,17 @@ ${n}`; peg$fail(peg$e34); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsebegin_display_math() { var s0, s1, s2; + var key = peg$currPos * 52 + 23; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$parseescape(); if (s1 !== peg$FAILED) { @@ -18762,10 +18923,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseend_display_math() { var s0, s1, s2; + var key = peg$currPos * 52 + 24; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$parseescape(); if (s1 !== peg$FAILED) { @@ -18789,10 +18957,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsebegin_inline_math() { var s0, s1, s2; + var key = peg$currPos * 52 + 25; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$parseescape(); if (s1 !== peg$FAILED) { @@ -18816,10 +18991,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseend_inline_math() { var s0, s1, s2; + var key = peg$currPos * 52 + 26; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$parseescape(); if (s1 !== peg$FAILED) { @@ -18843,10 +19025,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsebegin_env() { var s0, s1, s2; + var key = peg$currPos * 52 + 27; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$parseescape(); if (s1 !== peg$FAILED) { @@ -18870,10 +19059,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseend_env() { var s0, s1, s2; + var key = peg$currPos * 52 + 28; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$parseescape(); if (s1 !== peg$FAILED) { @@ -18897,10 +19093,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsemath_env_name() { var s0, s1; + var key = peg$currPos * 52 + 29; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.substr(peg$currPos, 9) === peg$c20) { s1 = peg$c20; @@ -19070,10 +19273,17 @@ ${n}`; s1 = peg$f56(s1); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseescape() { var s0, s1; + var key = peg$currPos * 52 + 30; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { @@ -19097,10 +19307,17 @@ ${n}`; peg$fail(peg$e55); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsebegin_group() { var s0, s1; + var key = peg$currPos * 52 + 31; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 123) { s1 = peg$c36; @@ -19116,10 +19333,17 @@ ${n}`; s1 = peg$f58(s1); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseend_group() { var s0, s1; + var key = peg$currPos * 52 + 32; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 125) { s1 = peg$c37; @@ -19135,10 +19359,17 @@ ${n}`; s1 = peg$f59(s1); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsemath_shift() { var s0, s1; + var key = peg$currPos * 52 + 33; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 36) { s1 = peg$c38; @@ -19154,10 +19385,17 @@ ${n}`; s1 = peg$f60(s1); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsealignment_tab() { var s0, s1; + var key = peg$currPos * 52 + 34; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 38) { s1 = peg$c39; @@ -19173,10 +19411,17 @@ ${n}`; s1 = peg$f61(s1); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsenl() { var s0, s1, s2; + var key = peg$currPos * 52 + 35; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$currPos; @@ -19247,10 +19492,17 @@ ${n}`; peg$fail(peg$e61); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsemacro_parameter() { var s0, s1; + var key = peg$currPos * 52 + 36; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 35) { s1 = peg$c43; @@ -19266,10 +19518,17 @@ ${n}`; s1 = peg$f62(s1); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsesuperscript() { var s0, s1; + var key = peg$currPos * 52 + 37; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 94) { s1 = peg$c44; @@ -19285,10 +19544,17 @@ ${n}`; s1 = peg$f63(s1); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsesubscript() { var s0, s1; + var key = peg$currPos * 52 + 38; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 95) { s1 = peg$c45; @@ -19304,10 +19570,17 @@ ${n}`; s1 = peg$f64(s1); } s0 = s1; + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseignore() { var s0; + var key = peg$currPos * 52 + 39; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } if (input.charCodeAt(peg$currPos) === 0) { s0 = peg$c46; peg$currPos++; @@ -19317,10 +19590,17 @@ ${n}`; peg$fail(peg$e68); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsesp() { var s0, s1, s2; + var key = peg$currPos * 52 + 40; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = []; @@ -19361,10 +19641,17 @@ ${n}`; peg$fail(peg$e8); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsechar() { var s0; + var key = peg$currPos * 52 + 41; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; if (peg$r2.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); @@ -19381,10 +19668,17 @@ ${n}`; peg$fail(peg$e70); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsenum() { var s0; + var key = peg$currPos * 52 + 42; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; if (peg$r3.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); @@ -19401,10 +19695,17 @@ ${n}`; peg$fail(peg$e72); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsepunctuation() { var s0, s1; + var key = peg$currPos * 52 + 43; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; if (peg$r4.test(input.charAt(peg$currPos))) { @@ -19428,10 +19729,17 @@ ${n}`; peg$fail(peg$e74); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsecomment_start() { var s0; + var key = peg$currPos * 52 + 44; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } if (input.charCodeAt(peg$currPos) === 37) { s0 = peg$c0; peg$currPos++; @@ -19441,10 +19749,17 @@ ${n}`; peg$fail(peg$e7); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsefull_comment() { var s0; + var key = peg$currPos * 52 + 45; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$parseownline_comment(); if (s0 === peg$FAILED) { @@ -19456,10 +19771,17 @@ ${n}`; peg$fail(peg$e76); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseownline_comment() { var s0, s1, s2, s3; + var key = peg$currPos * 52 + 46; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$currPos; s2 = []; @@ -19493,10 +19815,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsesameline_comment() { var s0, s1, s2; + var key = peg$currPos * 52 + 47; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = []; s2 = peg$parsesp(); @@ -19512,10 +19841,17 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsecomment() { var s0, s1, s2, s3, s4, s5, s6, s7; + var key = peg$currPos * 52 + 48; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$silentFails++; s0 = peg$currPos; s1 = peg$parsecomment_start(); @@ -19736,10 +20072,17 @@ ${n}`; peg$fail(peg$e77); } } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseleading_sp() { var s0, s1, s2, s3, s4; + var key = peg$currPos * 52 + 49; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; s1 = peg$currPos; s2 = peg$parsestart_of_line(); @@ -19761,10 +20104,17 @@ ${n}`; } else { s0 = s1; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parsestart_of_line() { var s0; + var key = peg$currPos * 52 + 50; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } peg$savedPos = peg$currPos; s0 = peg$f73(); if (s0) { @@ -19772,10 +20122,17 @@ ${n}`; } else { s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function peg$parseEOF() { var s0, s1; + var key = peg$currPos * 52 + 51; + var cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } s0 = peg$currPos; peg$silentFails++; if (input.length > peg$currPos) { @@ -19794,6 +20151,7 @@ ${n}`; peg$currPos = s0; s0 = peg$FAILED; } + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; return s0; } function toString2(e) {