From 36bf635f35f8e24557ff3905a4b4e8384e9e20c2 Mon Sep 17 00:00:00 2001 From: Martin Fleck Date: Mon, 27 Nov 2023 12:01:50 +0100 Subject: [PATCH] Fix usage of 'Chevrotrain' -> 'Chevrotain' --- .vscode/settings.json | 19 +++++-------------- README.md | 10 +++++----- .../lexer/cross-model-lexer.ts | 2 +- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a0672169..c1820181 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,10 +10,7 @@ "source.fixAll.eslint": true, "source.fixAll.markdownlint": true }, - "eslint.validate": [ - "javascript", - "typescript" - ], + "eslint.validate": ["javascript", "typescript"], "search.exclude": { "**/node_modules": true, "**/out": true, @@ -56,11 +53,7 @@ "ul_multi": 3 }, "no-inline-html": { - "allowed_elements": [ - "br", - "details", - "summary" - ] + "allowed_elements": ["br", "details", "summary"] } }, "jest.jestCommandLine": "yarn test", @@ -68,7 +61,7 @@ "cSpell.enabled": true, "cSpell.words": [ "Langium", - "Chevrotrain", + "Chevrotain", "CrossModel", "Modelserver", "CrossBreeze", @@ -89,7 +82,5 @@ "typescript", "typescriptreact" ], - "cSpell.ignoreRegExpList": [ - "/^\\s*import.*from.*/gm" - ] -} \ No newline at end of file + "cSpell.ignoreRegExpList": ["/^\\s*import.*from.*/gm"] +} diff --git a/README.md b/README.md index a11a18a2..d6126e2d 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,8 @@ The repository itself contains the following components structured as follows: ## Used libraries and license -- mui-x : MUI X is open core—base components are MIT-licensed, while more advanced features require a Pro or Premium commercial license. We are currently only using core-base -- react-tabs: MIT -- chevrotrain: This library is a dependency of langium. To get the Yaml language working in crossmodel an example implementation of the python language of chevrotrain has been used. This example has been modified to make it work for the yaml language. - - - - example that has been used: +- mui-x : MUI X is open core—base components are MIT-licensed, while more advanced features require a Pro or Premium commercial license. We are currently only using core-base +- react-tabs: MIT +- chevrotain: This library is a dependency of langium. To get the Yaml language working in crossmodel an example implementation of the python language of chevrotain has been used. This example has been modified to make it work for the yaml language. + - + - example that has been used: diff --git a/extensions/crossmodel-lang/src/language-server/lexer/cross-model-lexer.ts b/extensions/crossmodel-lang/src/language-server/lexer/cross-model-lexer.ts index 0fc64825..a0fd7e10 100644 --- a/extensions/crossmodel-lang/src/language-server/lexer/cross-model-lexer.ts +++ b/extensions/crossmodel-lang/src/language-server/lexer/cross-model-lexer.ts @@ -75,7 +75,7 @@ export class CrossModelLexer extends DefaultLexer { // add remaining dedents while (indentStack.pop()) { - // chevrotrain uses 1-based indices for tokens which Langium transforms into 0-based indices by deducting 1 + // chevrotain uses 1-based indices for tokens which Langium transforms into 0-based indices by deducting 1 // see for instance https://github.com/eclipse-langium/langium/blob/eea5bc2/packages/langium/src/utils/cst-util.ts#L49 const startOffset = text.length || 1; const endOffset = text.length || 1;