From 6138dd8714343ef93055e79cae1feee23b13337b Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 8 Sep 2022 20:41:08 +0530 Subject: [PATCH] Fix info --- src/diagrams/info/infoParser.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/diagrams/info/infoParser.ts b/src/diagrams/info/infoParser.ts index eee17cb08..80702b2fc 100644 --- a/src/diagrams/info/infoParser.ts +++ b/src/diagrams/info/infoParser.ts @@ -28,14 +28,18 @@ class InfoParser extends EmbeddedActionsParser { infoDb.clear(); } - public infoDiagram = this.RULE('infoDiagram', () => { + public diagram = this.RULE('diagram', () => { this.MANY(() => { this.CONSUME(NewLine); }); this.SUBRULE(this.hdr); - this.AT_LEAST_ONE(() => { + this.MANY2(() => { this.SUBRULE2(this.row); }); + infoDb.setInfo(true); + this.MANY3(() => { + this.CONSUME2(NewLine); + }); }); public hdr = this.RULE('hdr', () => { @@ -61,7 +65,7 @@ const parser = new InfoParser(); const parse = (text: string): void => { const lexResult = InfoLexer.tokenize(text); parser.input = lexResult.tokens; - parser.infoDiagram(); + parser.diagram(); if (parser.errors.length > 0 || lexResult.errors.length > 0) { log.error(