+1410
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+1194
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+22
@@ -0,0 +1,22 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2021 TypeFox GmbH
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License, which is available in the project root.
|
||||
******************************************************************************/
|
||||
import type { LangiumCoreServices } from '../services.js';
|
||||
export interface GrammarConfig {
|
||||
/**
|
||||
* Lists all rule names which are classified as multiline comment rules
|
||||
*/
|
||||
multilineCommentRules: string[];
|
||||
/**
|
||||
* A regular expression which matches characters of names
|
||||
*/
|
||||
nameRegexp: RegExp;
|
||||
}
|
||||
/**
|
||||
* Create the default grammar configuration (used by `createDefaultModule`). This can be overridden in a
|
||||
* language-specific module.
|
||||
*/
|
||||
export declare function createGrammarConfig(services: LangiumCoreServices): GrammarConfig;
|
||||
//# sourceMappingURL=grammar-config.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"grammar-config.d.ts","sourceRoot":"","sources":["../../src/languages/grammar-config.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAM1D,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAA;IAC/B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;CACrB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,aAAa,CAYhF"}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2021 TypeFox GmbH
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License, which is available in the project root.
|
||||
******************************************************************************/
|
||||
import { DefaultNameRegexp } from '../utils/cst-utils.js';
|
||||
import { isCommentTerminal, terminalRegex } from '../utils/grammar-utils.js';
|
||||
import { isMultilineComment } from '../utils/regexp-utils.js';
|
||||
import { isTerminalRule } from './generated/ast.js';
|
||||
/**
|
||||
* Create the default grammar configuration (used by `createDefaultModule`). This can be overridden in a
|
||||
* language-specific module.
|
||||
*/
|
||||
export function createGrammarConfig(services) {
|
||||
const rules = [];
|
||||
const grammar = services.Grammar;
|
||||
for (const rule of grammar.rules) {
|
||||
if (isTerminalRule(rule) && isCommentTerminal(rule) && isMultilineComment(terminalRegex(rule))) {
|
||||
rules.push(rule.name);
|
||||
}
|
||||
}
|
||||
return {
|
||||
multilineCommentRules: rules,
|
||||
nameRegexp: DefaultNameRegexp
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=grammar-config.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"grammar-config.js","sourceRoot":"","sources":["../../src/languages/grammar-config.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAGhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAapD;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAA6B;IAC7D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YAC7F,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;IACL,CAAC;IACD,OAAO;QACH,qBAAqB,EAAE,KAAK;QAC5B,UAAU,EAAE,iBAAiB;KAChC,CAAC;AACN,CAAC"}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2023 TypeFox GmbH
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License, which is available in the project root.
|
||||
******************************************************************************/
|
||||
export * from './grammar-config.js';
|
||||
export * from './language-meta-data.js';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/languages/index.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC"}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2023 TypeFox GmbH
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License, which is available in the project root.
|
||||
******************************************************************************/
|
||||
export * from './grammar-config.js';
|
||||
export * from './language-meta-data.js';
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/languages/index.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC"}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2021 TypeFox GmbH
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License, which is available in the project root.
|
||||
******************************************************************************/
|
||||
/**
|
||||
* Metadata of a language.
|
||||
*/
|
||||
export interface LanguageMetaData {
|
||||
languageId: string;
|
||||
fileExtensions: readonly string[];
|
||||
fileNames?: readonly string[];
|
||||
caseInsensitive: boolean;
|
||||
/**
|
||||
* Mode used to optimize code for development or production environments.
|
||||
*
|
||||
* In production mode, all Chevrotain lexer/parser validations are disabled.
|
||||
*/
|
||||
mode: 'development' | 'production';
|
||||
}
|
||||
//# sourceMappingURL=language-meta-data.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"language-meta-data.d.ts","sourceRoot":"","sources":["../../src/languages/language-meta-data.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;CACtC"}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2021 TypeFox GmbH
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License, which is available in the project root.
|
||||
******************************************************************************/
|
||||
export {};
|
||||
//# sourceMappingURL=language-meta-data.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"language-meta-data.js","sourceRoot":"","sources":["../../src/languages/language-meta-data.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF"}
|
||||
Reference in New Issue
Block a user