| 1 | import type { CstNode, GrammarAST, ValueType } from 'langium'; |
| 2 | |
| 3 | import { AbstractMermaidValueConverter } from '../common/index.js'; |
| 4 | |
| 5 | export class PieValueConverter extends AbstractMermaidValueConverter { |
| 6 | protected runCustomConverter( |
| 7 | rule: GrammarAST.AbstractRule, |
| 8 | input: string, |
| 9 | _cstNode: CstNode |
| 10 | ): ValueType | undefined { |
| 11 | if (rule.name !== 'PIE_SECTION_LABEL') { |
| 12 | return undefined; |
| 13 | } |
| 14 | return input.replace(/"/g, '').trim(); |
| 15 | } |
| 16 | } |
| 17 |