From 1aa8b9b8042a514557c2b8a17f434461ba513fbf Mon Sep 17 00:00:00 2001 From: knsv Date: Sat, 21 Sep 2019 11:31:09 -0700 Subject: [PATCH] #945 Handling recursive logn descriptions for states with quotes --- src/diagrams/state/parser/stateDiagram.jison | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diagrams/state/parser/stateDiagram.jison b/src/diagrams/state/parser/stateDiagram.jison index 23a2c8c12..ad2897657 100644 --- a/src/diagrams/state/parser/stateDiagram.jison +++ b/src/diagrams/state/parser/stateDiagram.jison @@ -38,8 +38,8 @@ "state"\s+ { this.pushState('STATE'); } ["] this.begin("STATE_STRING"); -"as"\s* {this.popState('STATE_ID');return "AS";} -[^\n] {this.popState('STATE_ID');return "ID";} +"as"\s* {this.popState();this.pushState('STATE_ID');return "AS";} +[^\n]* {this.popState();console.log('ID');return "ID";} ["] this.popState(); [^"]* { console.log('Long description:', yytext);return "STATE_DESCR";} [^\n\s\{]+ {console.log('COMPOSIT_STATE', yytext);return 'COMPOSIT_STATE';}