• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mermaid-js / mermaid / 5223976680

pending completion
5223976680

Pull #4450

github

web-flow
Merge 33a37392b into 6115f6976
Pull Request #4450: add `mermaid-parser` separate package

3318 of 3758 branches covered (88.29%)

Branch coverage included in aggregate %.

2098 of 2098 new or added lines in 35 files covered. (100.0%)

38611 of 54295 relevant lines covered (71.11%)

243.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.56
/packages/parser/src/language/services/value-converters/pieValueConverter.ts
1
/* eslint-disable @typescript-eslint/no-non-null-assertion */
1✔
2
import { DefaultValueConverter, type CstNode, type GrammarAST, type ValueType } from 'langium';
1✔
3

1✔
4
import { CommonValueConverter } from './commonValueConverters.js';
1✔
5

1✔
6
export class PieValueConverter extends DefaultValueConverter {
1✔
7
  public runConverter(rule: GrammarAST.AbstractRule, input: string, cstNode: CstNode): ValueType {
1✔
8
    const value = CommonValueConverter.customRunConverter(rule, input, cstNode);
×
9
    if (value === null) {
×
10
      return super.runConverter(rule, input, cstNode);
×
11
    } else {
×
12
      return value;
×
13
    }
×
14
  }
×
15

1✔
16
  /**
1✔
17
   * A method contains convert logic to be used by class itself or `MermaidValueConverter`.
1✔
18
   *
1✔
19
   * @param rule - Parsed rule.
1✔
20
   * @param input - Matched string.
1✔
21
   * @param cstNode - Node in the Concrete Syntax Tree (CST).
1✔
22
   * @returns converted the value if it's pie rule or `null` if it's not.
1✔
23
   */
1✔
24
  public static customRunConverter(
1✔
25
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
75✔
26
    rule: GrammarAST.AbstractRule,
75✔
27
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
75✔
28
    input: string,
75✔
29
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
75✔
30
    cstNode: CstNode
75✔
31
  ): ValueType | null {
75✔
32
    return null;
75✔
33
  }
75✔
34
}
1✔
35
/* eslint-enable @typescript-eslint/no-non-null-assertion */
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc