Give STR token higher precedence

This commit is contained in:
Ibrahim Wassouf 2023-07-08 13:29:48 -03:00
parent d05d249080
commit 58b2b0993a
1 changed files with 4 additions and 4 deletions

View File

@ -50,6 +50,10 @@ accDescr\s*"{"\s* { this.begin("acc_descr_multili
"classDiagram" return 'CLASS_DIAGRAM';
"[*]" return 'EDGE_STATE';
<string>["] this.popState();
<string>[^"]* return "STR";
<*>["] this.begin("string");
<INITIAL,namespace>"namespace" { this.begin('namespace'); return 'NAMESPACE'; }
<namespace>\s*(\r?\n)+ { this.popState(); return 'NEWLINE'; }
<namespace>\s+ /* skip whitespace */
@ -110,10 +114,6 @@ Function arguments are optional: 'call <callback_name>()' simply executes 'callb
<generic>[^~]* return "GENERICTYPE";
<INITIAL,class>"~" this.begin("generic");
<string>["] this.popState();
<string>[^"]* return "STR";
<*>["] this.begin("string");
<bqstring>[`] this.popState();
<bqstring>[^`]+ return "BQUOTE_STR";
<*>[`] this.begin("bqstring");