Merge pull request #1287 from mermaid-js/revert-1281-feature/1249_BlockComments

Revert "Multiline comments" - accidentally merged
This commit is contained in:
GDFaber 2020-02-29 21:40:55 +01:00 committed by GitHub
commit 2a55e74e11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 5 additions and 12 deletions

View File

@ -9,8 +9,7 @@
%x string generic struct
%%
\%\%[^\n]*\n* /* skip comments */
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
\%\%[^\n]*\n* /* do nothing */
\n+ return 'NEWLINE';
\s+ /* skip whitespace */
"classDiagram" return 'CLASS_DIAGRAM';

View File

@ -10,8 +10,7 @@
%x dir
%x vertex
%%
\%\%[^\n]*\n* /* skip comments */
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
\%\%[^\n]*\n* /* do nothing */
["] this.begin("string");
<string>["] this.popState();
<string>[^"]* return "STR";

View File

@ -17,7 +17,6 @@
\s+ /* skip whitespace */
\#[^\n]* /* skip comments */
\%%[^\n]* /* skip comments */
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
/*
---interactivity command---

View File

@ -18,7 +18,6 @@
\s+ /* skip all whitespace */
\#[^\n]* /* skip comments */
\%%[^\n]* /* skip comments */
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
"gitGraph" return 'GG';
"commit" return 'COMMIT';
"branch" return 'BRANCH';

View File

@ -12,8 +12,7 @@
%}
%%
\%\%[^\n]* /* skip comments */
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
\%\%[^\n]* /* do nothing */
\s+ /* skip whitespace */
"pie" return 'pie' ;
[\s\n\r]+ return 'NL' ;

View File

@ -26,7 +26,6 @@
<ID,ALIAS,LINE>((?!\n)\s)+ /* skip same-line whitespace */
<INITIAL,ID,ALIAS,LINE>\#[^\n]* /* skip comments */
\%%[^\n]* /* skip comments */
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
"participant" { this.begin('ID'); return 'participant'; }
<ID>[^\->:\n,;]+?(?=((?!\n)\s)+"as"(?!\n)\s|[#\n;]|$) { yytext = yytext.trim(); this.begin('ALIAS'); return 'ACTOR'; }
<ALIAS>"as" { this.popState(); this.popState(); this.begin('LINE'); return 'AS'; }

View File

@ -33,11 +33,10 @@
%%
[\n]+ return 'NL';
\s+ /* skip all whitespace */
\s+ /* skip all whitespace */
<ID,STATE,struct,LINE>((?!\n)\s)+ /* skip same-line whitespace */
<INITIAL,ID,STATE,struct,LINE>\#[^\n]* /* skip comments */
\%%[^\n]* /* skip comments */
\%\%\*((.|\n)*)\*\%\% /* multiline skip comments */
\%%[^\n]* /* skip comments */
"scale"\s+ { this.pushState('SCALE'); /* console.log('Got scale', yytext);*/ return 'scale'; }
<SCALE>\d+ return 'WIDTH';