mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-07 22:34:17 +01:00
17 lines
465 B
TypeScript
17 lines
465 B
TypeScript
import type { CstNode, GrammarAST, ValueType } from 'langium';
|
|
|
|
import { AbstractMermaidValueConverter } from '../common/index.js';
|
|
|
|
export class PieValueConverter extends AbstractMermaidValueConverter {
|
|
protected runCustomConverter(
|
|
rule: GrammarAST.AbstractRule,
|
|
input: string,
|
|
_cstNode: CstNode
|
|
): ValueType | undefined {
|
|
if (rule.name !== 'PIE_SECTION_LABEL') {
|
|
return undefined;
|
|
}
|
|
return input.replace(/"/g, '').trim();
|
|
}
|
|
}
|