mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 05:49:43 +02:00
refactor: Address review comments
Moved some types around Removed unnecessary params Co-authored-by: Reda Al Sulais <u.yokozuna@gmail.com> Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
@@ -2,13 +2,19 @@ grammar Packet
|
||||
import "../common/common";
|
||||
|
||||
entry Packet:
|
||||
"packet-beta" NEWLINE*
|
||||
TitleAndAccessibilities?
|
||||
(blocks+=Block)*;
|
||||
NEWLINE*
|
||||
"packet-beta"
|
||||
(
|
||||
NEWLINE* TitleAndAccessibilities blocks+=PacketBlock*
|
||||
| NEWLINE+ blocks+=PacketBlock+
|
||||
| NEWLINE*
|
||||
)
|
||||
;
|
||||
|
||||
Block:
|
||||
start=INT ('-' end=INT)? ':' label=STRING;
|
||||
PacketBlock:
|
||||
start=INT('-' end=INT)? ':' label=STRING NEWLINE+
|
||||
;
|
||||
|
||||
hidden terminal WS: /\s+/;
|
||||
terminal INT returns number: /[0-9]+/;
|
||||
terminal INT returns number: /0|[1-9][0-9]*/;
|
||||
terminal STRING: /"[^"]*"|'[^']*'/;
|
||||
|
Reference in New Issue
Block a user