diff --git a/examples/grammars/css/css.js b/examples/grammars/css/css.js index 60868f831..5eec11f0b 100644 --- a/examples/grammars/css/css.js +++ b/examples/grammars/css/css.js @@ -68,7 +68,7 @@ const Uri = createToken({ name: "Uri", pattern: Lexer.NA }); const UriString = createToken({ name: "UriString", pattern: MAKE_PATTERN( - "url\\((:?{{spaces}})?({{string1}}|{{string2}})(:?{{spaces}})?\\)" + "url\\((:?{{spaces}})?({{string1}}|{{string2}})(:?{{spaces}})?\\)", ), categories: Uri, }); diff --git a/examples/grammars/ecma5/ecma5_parser.js b/examples/grammars/ecma5/ecma5_parser.js index d13041761..a866b0628 100644 --- a/examples/grammars/ecma5/ecma5_parser.js +++ b/examples/grammars/ecma5/ecma5_parser.js @@ -60,7 +60,7 @@ export class ECMAScript5Parser extends EmbeddedActionsParser { { ALT: () => $.SUBRULE($.ArrayLiteral) }, { ALT: () => $.SUBRULE($.ObjectLiteral) }, { ALT: () => $.SUBRULE($.ParenthesisExpression) }, - ]) + ]), ); }); @@ -246,7 +246,7 @@ export class ECMAScript5Parser extends EmbeddedActionsParser { { ALT: () => $.CONSUME(t.Minus) }, { ALT: () => $.CONSUME(t.Tilde) }, { ALT: () => $.CONSUME(t.Exclamation) }, - ]) + ]), ); $.SUBRULE($.UnaryExpression); }, @@ -276,7 +276,7 @@ export class ECMAScript5Parser extends EmbeddedActionsParser { ALT: () => $.CONSUME(t.AbsMultiplicativeOperator), }, { ALT: () => $.CONSUME(t.AbsAdditiveOperator) }, - ]) + ]), ); $.SUBRULE2($.UnaryExpression); }); @@ -303,7 +303,7 @@ export class ECMAScript5Parser extends EmbeddedActionsParser { ALT: () => $.CONSUME(t.AbsMultiplicativeOperator), }, { ALT: () => $.CONSUME(t.AbsAdditiveOperator) }, - ]) + ]), ); $.SUBRULE2($.UnaryExpression); }); @@ -378,7 +378,7 @@ export class ECMAScript5Parser extends EmbeddedActionsParser { { ALT: () => $.SUBRULE($.ThrowStatement) }, { ALT: () => $.SUBRULE($.TryStatement) }, { ALT: () => $.SUBRULE($.DebuggerStatement) }, - ]) + ]), ); }); @@ -575,7 +575,7 @@ export class ECMAScript5Parser extends EmbeddedActionsParser { }, }, ]); - } + }, ); // See 12.7 @@ -691,9 +691,9 @@ export class ECMAScript5Parser extends EmbeddedActionsParser { // happening in this case because that type of recovery can only happen if CONSUME(...) was invoked. this.SAVE_ERROR( new MismatchedTokenException( - "Line Terminator not allowed before Expression in Throw Statement" + "Line Terminator not allowed before Expression in Throw Statement", // TODO: create line terminator token on the fly? - ) + ), ); } $.SUBRULE($.Expression); diff --git a/examples/grammars/graphql/graphql.js b/examples/grammars/graphql/graphql.js index 99da276ea..78f328552 100644 --- a/examples/grammars/graphql/graphql.js +++ b/examples/grammars/graphql/graphql.js @@ -65,7 +65,7 @@ const createNotToken = function (config) { // All matching keywords now match the category of the NOT token. matchingKeywords.forEach((keywordTokType) => - keywordTokType.CATEGORIES.push(newNotTokenCategory) + keywordTokType.CATEGORIES.push(newNotTokenCategory), ); // Name always matches the Not token @@ -251,20 +251,20 @@ const IntValue = createToken({ const FloatValue = createToken({ name: "FloatValue", pattern: MAKE_PATTERN( - "{{IntegerPart}}{{FractionalPart}}({{ExponentPart}})?|{{IntegerPart}}{{ExponentPart}}" + "{{IntegerPart}}{{FractionalPart}}({{ExponentPart}})?|{{IntegerPart}}{{ExponentPart}}", ), }); FRAGMENT("EscapedCharacter", '[\\\\/"bfnrt]'); FRAGMENT("EscapedUnicode", "[0-9a-fA-F]{4}"); FRAGMENT( "StringCharacter", - '(?:[^\\\\"\\n\\r]|\\\\(?:{{EscapedUnicode}}|u{{EscapedCharacter}}))' + '(?:[^\\\\"\\n\\r]|\\\\(?:{{EscapedUnicode}}|u{{EscapedCharacter}}))', ); FRAGMENT("BlockStringCharacter", '\\\\"""|[^"]|"(?!"")'); const StringValue = createToken({ name: "StringValue", pattern: MAKE_PATTERN( - '"""(?:{{BlockStringCharacter}})*"""|"(?:{{StringCharacter}})*"' + '"""(?:{{BlockStringCharacter}})*"""|"(?:{{StringCharacter}})*"', ), }); diff --git a/examples/grammars/xml/xml_lexer.js b/examples/grammars/xml/xml_lexer.js index 1ff682c66..b0bbcc49a 100644 --- a/examples/grammars/xml/xml_lexer.js +++ b/examples/grammars/xml/xml_lexer.js @@ -40,12 +40,12 @@ function createToken(options) { FRAGMENT( "NameStartChar", - "([a-zA-Z]|\\u2070-\\u218F|\\u2C00-\\u2FEF|\\u3001-\\uD7FF|\\uF900-\\uFDCF|\\uFDF0-\\uFFFD)" + "([a-zA-Z]|\\u2070-\\u218F|\\u2C00-\\u2FEF|\\u3001-\\uD7FF|\\uF900-\\uFDCF|\\uFDF0-\\uFFFD)", ); FRAGMENT( "NameChar", - makePattern`${f.NameStartChar}|-|_|\\.|\\d|\\u00B7||[\\u0300-\\u036F]|[\\u203F-\\u2040]` + makePattern`${f.NameStartChar}|-|_|\\.|\\d|\\u00B7||[\\u0300-\\u036F]|[\\u203F-\\u2040]`, ); FRAGMENT("Name", makePattern`${f.NameStartChar}(${f.NameChar})*`); diff --git a/examples/lexer/custom_errors/custom_errors.js b/examples/lexer/custom_errors/custom_errors.js index f9555d8fb..9cb13863a 100644 --- a/examples/lexer/custom_errors/custom_errors.js +++ b/examples/lexer/custom_errors/custom_errors.js @@ -19,11 +19,11 @@ const OyVeyErrorMessageProvider = { // eslint-disable-next-line no-unused-vars -- template line, // eslint-disable-next-line no-unused-vars -- template - column + column, ) { return ( `Oy Vey!!! unexpected character: ->${fullText.charAt( - startOffset + startOffset, )}<- at offset: ${startOffset},` + ` skipped ${length} characters.` ); }, diff --git a/examples/lexer/python_indentation/python_indentation.js b/examples/lexer/python_indentation/python_indentation.js index 32022d92b..671c77b1f 100644 --- a/examples/lexer/python_indentation/python_indentation.js +++ b/examples/lexer/python_indentation/python_indentation.js @@ -70,7 +70,7 @@ function matchIndentBase(text, offset, matchedTokens, groups, type) { else if (currIndentLevel < prevIndentLevel && type === "outdent") { const matchIndentIndex = _.findLastIndex( indentStack, - (stackIndentDepth) => stackIndentDepth === currIndentLevel + (stackIndentDepth) => stackIndentDepth === currIndentLevel, ); // any outdent must match some previous indentation level. @@ -89,7 +89,7 @@ function matchIndentBase(text, offset, matchedTokens, groups, type) { for (let i = iStart; i < numberOfDedents; i++) { indentStack.pop(); matchedTokens.push( - createTokenInstance(Outdent, "", NaN, NaN, NaN, NaN, NaN, NaN) + createTokenInstance(Outdent, "", NaN, NaN, NaN, NaN, NaN, NaN), ); } @@ -176,7 +176,7 @@ export function tokenize(text) { //add remaining Outdents while (indentStack.length > 1) { lexResult.tokens.push( - createTokenInstance(Outdent, "", NaN, NaN, NaN, NaN, NaN, NaN) + createTokenInstance(Outdent, "", NaN, NaN, NaN, NaN, NaN, NaN), ); indentStack.pop(); } diff --git a/examples/parser/content_assist/content_assist_complex.js b/examples/parser/content_assist/content_assist_complex.js index 95f41f9ee..9419e5c9d 100644 --- a/examples/parser/content_assist/content_assist_complex.js +++ b/examples/parser/content_assist/content_assist_complex.js @@ -157,7 +157,7 @@ export function getContentAssistSuggestions(text, symbolTable) { const syntacticSuggestions = parserInstance.computeContentAssist( "startRule", - assistanceTokenVector + assistanceTokenVector, ); let finalSuggestions = []; diff --git a/examples/parser/content_assist/content_assist_complex_spec.js b/examples/parser/content_assist/content_assist_complex_spec.js index 6c888e7df..511c7d779 100644 --- a/examples/parser/content_assist/content_assist_complex_spec.js +++ b/examples/parser/content_assist/content_assist_complex_spec.js @@ -74,6 +74,6 @@ describe("The Official Content Assist Feature example Example", () => { .to.have.members(["function"]) .and.to.have.lengthOf(1); }); - } + }, ); }); diff --git a/examples/parser/content_assist/content_assist_simple.js b/examples/parser/content_assist/content_assist_simple.js index f413ee0a8..9c6d7a340 100644 --- a/examples/parser/content_assist/content_assist_simple.js +++ b/examples/parser/content_assist/content_assist_simple.js @@ -55,13 +55,13 @@ export function getContentAssistSuggestions(text) { const syntacticSuggestions = parserInstance.computeContentAssist( "myRule", - partialTokenVector + partialTokenVector, ); // The suggestions also include the context, we are only interested // in the TokenTypes in this example. const tokenTypesSuggestions = syntacticSuggestions.map( - (suggestion) => suggestion.nextTokenType + (suggestion) => suggestion.nextTokenType, ); return tokenTypesSuggestions; diff --git a/examples/parser/custom_errors/custom_errors_spec.js b/examples/parser/custom_errors/custom_errors_spec.js index 0d6c89493..4729ff0e5 100644 --- a/examples/parser/custom_errors/custom_errors_spec.js +++ b/examples/parser/custom_errors/custom_errors_spec.js @@ -12,14 +12,14 @@ describe("The Chevrotain support for custom error provider", () => { const errorsOverride = parseMismatch("A C"); expect(errorsOverride).to.have.lengthOf(1); expect(errorsOverride[0].message).to.equal( - "expecting Bravo at end of mis_match" + "expecting Bravo at end of mis_match", ); // we only modified the error for Bravo mismatches const errorsDefault = parseMismatch("C"); expect(errorsDefault).to.have.lengthOf(1); expect(errorsDefault[0].message).to.equal( - "Expecting token of type --> Alpha <-- but found --> 'C' <--" + "Expecting token of type --> Alpha <-- but found --> 'C' <--", ); }); @@ -33,7 +33,7 @@ describe("The Chevrotain support for custom error provider", () => { const errors = parseRedundant("A B C"); expect(errors).to.have.lengthOf(1); expect(errors[0].message).to.equal( - "very bad dog! you still have some input remaining at offset:4" + "very bad dog! you still have some input remaining at offset:4", ); }); @@ -41,7 +41,7 @@ describe("The Chevrotain support for custom error provider", () => { const errors = parseNoViable("C"); expect(errors).to.have.lengthOf(1); expect(errors[0].message).to.equal( - "Expecting: one of these possible Token sequences:\n 1. [Alpha]\n 2. [Bravo]\nbut found: 'C'" + "Expecting: one of these possible Token sequences:\n 1. [Alpha]\n 2. [Bravo]\nbut found: 'C'", ); }); @@ -49,7 +49,7 @@ describe("The Chevrotain support for custom error provider", () => { const errors = parseEarlyExit("A"); expect(errors).to.have.lengthOf(1); expect(errors[0].message).to.equal( - "Esperando por lo menos una iteraciĆ³n de: Bravo" + "Esperando por lo menos una iteraciĆ³n de: Bravo", ); }); }); diff --git a/examples/tutorial/step2_parsing/step2_parsing.js b/examples/tutorial/step2_parsing/step2_parsing.js index f0447f8cd..a1e4418da 100644 --- a/examples/tutorial/step2_parsing/step2_parsing.js +++ b/examples/tutorial/step2_parsing/step2_parsing.js @@ -102,7 +102,7 @@ export function parse(inputText) { if (parserInstance.errors.length > 0) { throw Error( "Sad sad panda, parsing errors detected!\n" + - parserInstance.errors[0].message + parserInstance.errors[0].message, ); } } diff --git a/examples/tutorial/step2_parsing/step2_parsing_spec.js b/examples/tutorial/step2_parsing/step2_parsing_spec.js index 832ec6233..8fab27624 100644 --- a/examples/tutorial/step2_parsing/step2_parsing_spec.js +++ b/examples/tutorial/step2_parsing/step2_parsing_spec.js @@ -12,10 +12,10 @@ describe("Chevrotain Tutorial", () => { // missing table name let inputText = "SELECT FROM table2"; expect(() => parse(inputText)).to.throw( - "expecting at least one iteration which starts with one of these possible Token sequences" + "expecting at least one iteration which starts with one of these possible Token sequences", ); expect(() => parse(inputText)).to.throw( - "<[Identifier]>\nbut found: 'FROM'" + "<[Identifier]>\nbut found: 'FROM'", ); }); }); diff --git a/examples/tutorial/step3_actions/main.js b/examples/tutorial/step3_actions/main.js index a833fe671..574d0934e 100644 --- a/examples/tutorial/step3_actions/main.js +++ b/examples/tutorial/step3_actions/main.js @@ -12,5 +12,5 @@ console.log(JSON.stringify(astFromVisitor, null, "\t")); assert.deepEqual( astFromVisitor, astFromEmbedded, - "Both ASTs should be identical" + "Both ASTs should be identical", ); diff --git a/examples/tutorial/step3_actions/step3a_actions_visitor.js b/examples/tutorial/step3_actions/step3a_actions_visitor.js index 7bdf0eeaf..3c97dfe05 100644 --- a/examples/tutorial/step3_actions/step3a_actions_visitor.js +++ b/examples/tutorial/step3_actions/step3a_actions_visitor.js @@ -116,7 +116,7 @@ export function toAstVisitor(inputText) { if (parserInstance.errors.length > 0) { throw Error( "Sad sad panda, parsing errors detected!\n" + - parserInstance.errors[0].message + parserInstance.errors[0].message, ); } diff --git a/examples/tutorial/step3_actions/step3b_actions_embedded.js b/examples/tutorial/step3_actions/step3b_actions_embedded.js index 6b4381f6c..aa674f054 100644 --- a/examples/tutorial/step3_actions/step3b_actions_embedded.js +++ b/examples/tutorial/step3_actions/step3b_actions_embedded.js @@ -145,7 +145,7 @@ export function toAstEmbedded(inputText) { if (parserInstance.errors.length > 0) { throw Error( "Sad sad panda, parsing errors detected!\n" + - parserInstance.errors[0].message + parserInstance.errors[0].message, ); } diff --git a/examples/tutorial/step4_error_recovery/step4_error_recovery_spec.js b/examples/tutorial/step4_error_recovery/step4_error_recovery_spec.js index ffe3bb97c..ceef0b879 100644 --- a/examples/tutorial/step4_error_recovery/step4_error_recovery_spec.js +++ b/examples/tutorial/step4_error_recovery/step4_error_recovery_spec.js @@ -34,7 +34,7 @@ describe("Chevrotain Tutorial", () => { let parsingResult = parseJsonToCst(invalidInput); expect(parsingResult.parseErrors).to.have.lengthOf(1); expect(parsingResult.parseErrors[0].message).to.include( - "Expecting token of type --> Colon <-- but found --> '666' <--" + "Expecting token of type --> Colon <-- but found --> '666' <--", ); let minimizedCst = minimizeCst(parsingResult.cst); @@ -116,7 +116,7 @@ describe("Chevrotain Tutorial", () => { let parsingResult = parseJsonToCst(invalidInput); expect(parsingResult.parseErrors).to.have.lengthOf(1); expect(parsingResult.parseErrors[0].message).to.include( - "Expecting token of type --> Colon <-- but found --> '}' <--" + "Expecting token of type --> Colon <-- but found --> '}' <--", ); let minimizedCst = minimizeCst(parsingResult.cst); @@ -194,7 +194,7 @@ describe("Chevrotain Tutorial", () => { let parsingResult = parseJsonToCst(invalidInput); expect(parsingResult.parseErrors).to.have.lengthOf(1); expect(parsingResult.parseErrors[0].message).to.include( - "Expecting token of type --> RCurly <-- but found --> '666'" + "Expecting token of type --> RCurly <-- but found --> '666'", ); let minimizedCst = minimizeCst(parsingResult.cst); @@ -205,15 +205,15 @@ describe("Chevrotain Tutorial", () => { // because the parser will re-sync to the next comma "," as that is the expected next Token after a key/value pair. expect(objectItemCstArr).to.have.lengthOf(3); expect(objectItemCstArr[0].children.StringLiteral[0].image).to.equal( - '"key1"' + '"key1"', ); expect(objectItemCstArr[1].children.StringLiteral[0].image).to.equal( - '"key2"' + '"key2"', ); // key3 will be re-synced // key4 appears in the input AFTER the error, yet due to error recovery it is still appears in the output expect(objectItemCstArr[2].children.StringLiteral[0].image).to.equal( - '"key4"' + '"key4"', ); }); @@ -228,7 +228,7 @@ describe("Chevrotain Tutorial", () => { let parsingResult = parseJsonToCst(invalidInput); expect(parsingResult.parseErrors).to.have.lengthOf(1); expect(parsingResult.parseErrors[0].message).to.include( - "Expecting: one of these possible Token sequences:\n 1. [StringLiteral]\n 2. [NumberLiteral]\n 3. [LCurly]\n 4. [LSquare]\n 5. [True]\n 6. [False]\n 7. [Null]\nbut found: ':'" + "Expecting: one of these possible Token sequences:\n 1. [StringLiteral]\n 2. [NumberLiteral]\n 3. [LCurly]\n 4. [LSquare]\n 5. [True]\n 6. [False]\n 7. [Null]\nbut found: ':'", ); let minimizedCst = minimizeCst(parsingResult.cst); @@ -237,18 +237,18 @@ describe("Chevrotain Tutorial", () => { minimizedCst.children.object[0].children.objectItem; expect(objectItemCstArr).to.have.lengthOf(4); expect(objectItemCstArr[0].children.StringLiteral[0].image).to.equal( - '"firstName"' + '"firstName"', ); // There is an error inside "someData" value, but we still get the key back (and part of the value...) expect(objectItemCstArr[1].children.StringLiteral[0].image).to.equal( - '"someData"' + '"someData"', ); // These keys appear AFTER the error, yet they were still parsed successfully due to error recovery. expect(objectItemCstArr[2].children.StringLiteral[0].image).to.equal( - '"isAlive"' + '"isAlive"', ); expect(objectItemCstArr[3].children.StringLiteral[0].image).to.equal( - '"age"' + '"age"', ); }); }); diff --git a/package.json b/package.json index 738051ab0..5608e5f46 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "lint-staged": "13.2.3", "mocha": "10.2.0", "npm-run-all": "4.1.5", - "prettier": "2.8.8", + "prettier": "3.0.0", "shx": "0.3.4", "cz-conventional-changelog": "3.3.0", "@commitlint/cli": "17.6.6", diff --git a/packages/chevrotain/benchmark_web/parsers/api.js b/packages/chevrotain/benchmark_web/parsers/api.js index 9b440080f..dc627a966 100644 --- a/packages/chevrotain/benchmark_web/parsers/api.js +++ b/packages/chevrotain/benchmark_web/parsers/api.js @@ -10,7 +10,7 @@ function parseBench( parser, rootRule, options, - parserConfig + parserConfig, ) { if (lexerInstance === undefined) { if (customLexer !== undefined) { diff --git a/packages/chevrotain/benchmark_web/parsers/css/css_parser.js b/packages/chevrotain/benchmark_web/parsers/css/css_parser.js index d2bafcf14..a4ae8b542 100644 --- a/packages/chevrotain/benchmark_web/parsers/css/css_parser.js +++ b/packages/chevrotain/benchmark_web/parsers/css/css_parser.js @@ -63,7 +63,7 @@ var Uri = createToken({ name: "Uri", pattern: Lexer.NA }); var UriString = createToken({ name: "UriString", pattern: MAKE_PATTERN( - "url\\((:?{{spaces}})?({{string1}}|{{string2}})(:?{{spaces}})?\\)" + "url\\((:?{{spaces}})?({{string1}}|{{string2}})(:?{{spaces}})?\\)", ), categories: Uri, }); diff --git a/packages/chevrotain/benchmark_web/parsers/ecma5/ecma5_parser.js b/packages/chevrotain/benchmark_web/parsers/ecma5/ecma5_parser.js index 390c1fe93..2dc92bbe3 100644 --- a/packages/chevrotain/benchmark_web/parsers/ecma5/ecma5_parser.js +++ b/packages/chevrotain/benchmark_web/parsers/ecma5/ecma5_parser.js @@ -59,7 +59,7 @@ class ECMAScript5Parser extends ChevrotainParser { { ALT: () => $.SUBRULE($.ArrayLiteral) }, { ALT: () => $.SUBRULE($.ObjectLiteral) }, { ALT: () => $.SUBRULE($.ParenthesisExpression) }, - ]) + ]), ); }); @@ -245,7 +245,7 @@ class ECMAScript5Parser extends ChevrotainParser { { ALT: () => $.CONSUME(t.Minus) }, { ALT: () => $.CONSUME(t.Tilde) }, { ALT: () => $.CONSUME(t.Exclamation) }, - ]) + ]), ); $.SUBRULE($.UnaryExpression); }, @@ -275,7 +275,7 @@ class ECMAScript5Parser extends ChevrotainParser { ALT: () => $.CONSUME(t.AbsMultiplicativeOperator), }, { ALT: () => $.CONSUME(t.AbsAdditiveOperator) }, - ]) + ]), ); $.SUBRULE2($.UnaryExpression); }); @@ -302,7 +302,7 @@ class ECMAScript5Parser extends ChevrotainParser { ALT: () => $.CONSUME(t.AbsMultiplicativeOperator), }, { ALT: () => $.CONSUME(t.AbsAdditiveOperator) }, - ]) + ]), ); $.SUBRULE2($.UnaryExpression); }); @@ -371,7 +371,7 @@ class ECMAScript5Parser extends ChevrotainParser { { ALT: () => $.SUBRULE($.ThrowStatement) }, { ALT: () => $.SUBRULE($.TryStatement) }, { ALT: () => $.SUBRULE($.DebuggerStatement) }, - ]) + ]), ); }); @@ -568,7 +568,7 @@ class ECMAScript5Parser extends ChevrotainParser { }, }, ]); - } + }, ); // See 12.7 @@ -684,9 +684,9 @@ class ECMAScript5Parser extends ChevrotainParser { // happening in this case because that type of recovery can only happen if CONSUME(...) was invoked. this.SAVE_ERROR( new chevrotain.exceptions.MismatchedTokenException( - "Line Terminator not allowed before Expression in Throw Statement" + "Line Terminator not allowed before Expression in Throw Statement", // TODO: create line terminator token on the fly? - ) + ), ); } $.SUBRULE($.Expression); diff --git a/packages/chevrotain/benchmark_web/parsers/json/json_parser.js b/packages/chevrotain/benchmark_web/parsers/json/json_parser.js index c289d4408..058afb40e 100644 --- a/packages/chevrotain/benchmark_web/parsers/json/json_parser.js +++ b/packages/chevrotain/benchmark_web/parsers/json/json_parser.js @@ -149,7 +149,7 @@ class parser extends ChevrotainParser { $.CONSUME(Null) } } - ]) + ]), ); }); diff --git a/packages/chevrotain/benchmark_web/parsers/worker_impel.js b/packages/chevrotain/benchmark_web/parsers/worker_impel.js index 1bd9a2149..2c17d361a 100644 --- a/packages/chevrotain/benchmark_web/parsers/worker_impel.js +++ b/packages/chevrotain/benchmark_web/parsers/worker_impel.js @@ -30,7 +30,7 @@ onmessage = function (event) { parser, startRule, options, - parserConfig + parserConfig, ); postMessage(0); } catch (e) { diff --git a/packages/chevrotain/diagrams/src/diagrams_behavior.js b/packages/chevrotain/diagrams/src/diagrams_behavior.js index 5eceb896b..81b6246e6 100644 --- a/packages/chevrotain/diagrams/src/diagrams_behavior.js +++ b/packages/chevrotain/diagrams/src/diagrams_behavior.js @@ -23,16 +23,16 @@ } var diagramHeaders = toArr( - document.getElementsByClassName("diagramHeader") + document.getElementsByClassName("diagramHeader"), ); diagramHeaders.forEach(function (header) { header.addEventListener( "mouseover", - toggleNonTerminalUsageAndDef_fromHeader + toggleNonTerminalUsageAndDef_fromHeader, ); header.addEventListener( "mouseout", - toggleNonTerminalUsageAndDef_fromHeader + toggleNonTerminalUsageAndDef_fromHeader, ); }); @@ -41,11 +41,11 @@ noneTerminalsText.forEach(function (nonTerminal) { nonTerminal.addEventListener( "mouseover", - toggleNonTerminalUsageAndDef_fromNoneTerminal + toggleNonTerminalUsageAndDef_fromNoneTerminal, ); nonTerminal.addEventListener( "mouseout", - toggleNonTerminalUsageAndDef_fromNoneTerminal + toggleNonTerminalUsageAndDef_fromNoneTerminal, ); if (scrollingEnabled) { @@ -166,7 +166,7 @@ // min time .1, max time .8 seconds var time = Math.max( 0.1, - Math.min(Math.abs(scrollY - scrollTargetY) / speed, 0.8) + Math.min(Math.abs(scrollY - scrollTargetY) / speed, 0.8), ); // easing equations from https://github.com/danro/easing-js/blob/master/easing.js diff --git a/packages/chevrotain/diagrams/src/diagrams_builder.js b/packages/chevrotain/diagrams/src/diagrams_builder.js index 639ad1ad6..4e195b067 100644 --- a/packages/chevrotain/diagrams/src/diagrams_builder.js +++ b/packages/chevrotain/diagrams/src/diagrams_builder.js @@ -34,7 +34,7 @@ topRules.forEach(function (production) { var currDiagramHtml = convertProductionToDiagram( production, - production.name + production.name, ); diagramsHtml += '