mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 22:39:26 +02:00
chore: Cleanup
This commit is contained in:
@@ -75,11 +75,12 @@ class PieParser extends EmbeddedActionsParser {
|
|||||||
this.CONSUME(NewLine);
|
this.CONSUME(NewLine);
|
||||||
});
|
});
|
||||||
this.OPTION2(() => {
|
this.OPTION2(() => {
|
||||||
|
this.CONSUME2(AccDescription);
|
||||||
this.OR([
|
this.OR([
|
||||||
{ ALT: () => this.SUBRULE(this.accDescriptionSingleLine) },
|
{ ALT: () => this.SUBRULE(this.accDescriptionSingleLine) },
|
||||||
{ ALT: () => this.SUBRULE(this.accDescriptionMultiLine) },
|
{ ALT: () => this.SUBRULE(this.accDescriptionMultiLine) },
|
||||||
]);
|
]);
|
||||||
this.CONSUME2(NewLine);
|
this.CONSUME3(NewLine);
|
||||||
});
|
});
|
||||||
this.AT_LEAST_ONE(() => {
|
this.AT_LEAST_ONE(() => {
|
||||||
this.SUBRULE2(this.row);
|
this.SUBRULE2(this.row);
|
||||||
@@ -112,14 +113,12 @@ class PieParser extends EmbeddedActionsParser {
|
|||||||
});
|
});
|
||||||
|
|
||||||
public accDescriptionSingleLine = this.RULE('accDescriptionSingleLine', () => {
|
public accDescriptionSingleLine = this.RULE('accDescriptionSingleLine', () => {
|
||||||
this.CONSUME(AccDescription);
|
|
||||||
this.CONSUME(Colon);
|
this.CONSUME(Colon);
|
||||||
const accDescrText = this.CONSUME(Text).image;
|
const accDescrText = this.CONSUME(Text).image;
|
||||||
this.ACTION(() => pieDb.setAccDescription(accDescrText));
|
this.ACTION(() => pieDb.setAccDescription(accDescrText));
|
||||||
});
|
});
|
||||||
|
|
||||||
public accDescriptionMultiLine = this.RULE('accDescriptionMultiLine', () => {
|
public accDescriptionMultiLine = this.RULE('accDescriptionMultiLine', () => {
|
||||||
this.CONSUME(AccDescription);
|
|
||||||
this.CONSUME(LeftCurly);
|
this.CONSUME(LeftCurly);
|
||||||
this.MANY(() => this.CONSUME(NewLine));
|
this.MANY(() => this.CONSUME(NewLine));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user