Removed STR remains and fixed whitespace issue for 'call' which lead to undesired whitespace in function names

This commit is contained in:
abzicht
2019-03-09 22:42:27 +01:00
parent d169641c99
commit 20b35cbe13

View File

@@ -9,7 +9,6 @@
/* string is used to detect blocks that are surrounded by double quotes. */ /* string is used to detect blocks that are surrounded by double quotes. */
/* copied from /src/diagrams/flowchart/parser/flow.jison */ /* copied from /src/diagrams/flowchart/parser/flow.jison */
%x string
%x click %x click
%x href %x href
%x callbackname %x callbackname
@@ -25,7 +24,7 @@
<href>[\s\n] this.popState(); /* e.g. return https://example.com for 'href https://example.com' */ <href>[\s\n] this.popState(); /* e.g. return https://example.com for 'href https://example.com' */
<href>[^\s\n]* return 'href'; /* the specified word must not contain whitespace */ <href>[^\s\n]* return 'href'; /* the specified word must not contain whitespace */
"call" this.begin("callbackname"); "call"[\s]+ this.begin("callbackname");
<callbackname>\( this.popState(); this.begin("callbackargs"); <callbackname>\( this.popState(); this.begin("callbackargs");
<callbackname>[^(]* return 'callbackname'; <callbackname>[^(]* return 'callbackname';
<callbackargs>\) this.popState(); <callbackargs>\) this.popState();