chore: apply review suggestions

* pref: optimize `common` rules and matchers
* chore: rename diagrams services to short form
* chore: sort imports
This commit is contained in:
Reda Al Sulais
2023-09-07 00:00:38 +03:00
parent 795baedbb1
commit 24d43849a0
22 changed files with 165 additions and 188 deletions

View File

@@ -0,0 +1,17 @@
import type { CstNode, GrammarAST, ValueType } from 'langium';
import { MermaidValueConverter } from '../common/valueConverter.js';
export class PieValueConverter extends MermaidValueConverter {
protected runCustomConverter(
rule: GrammarAST.AbstractRule,
input: string,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_cstNode: CstNode
): ValueType | undefined {
if (rule.name !== 'PIE_SECTION_LABEL') {
return undefined;
}
return input.replace(/"/g, '').trim();
}
}