@formulavize/lezer-fiz 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -12
- package/dist/index.es.js +13 -12
- package/package.json +1 -1
- package/src/fiz.grammar +5 -0
- package/src/highlight.js +1 -0
- package/test/directives.txt +154 -0
package/dist/index.cjs
CHANGED
|
@@ -5,10 +5,10 @@ var highlight = require('@lezer/highlight');
|
|
|
5
5
|
|
|
6
6
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
7
7
|
const Unit = 1,
|
|
8
|
-
cssIdentifier =
|
|
9
|
-
insertSemi =
|
|
10
|
-
spaces =
|
|
11
|
-
newline =
|
|
8
|
+
cssIdentifier = 47,
|
|
9
|
+
insertSemi = 48,
|
|
10
|
+
spaces = 50,
|
|
11
|
+
newline = 51,
|
|
12
12
|
LineComment = 2,
|
|
13
13
|
BlockComment = 3;
|
|
14
14
|
|
|
@@ -99,6 +99,7 @@ const fizHighlighting = highlight.styleTags({
|
|
|
99
99
|
Unit: highlight.tags.unit,
|
|
100
100
|
StyleTag: highlight.tags.tagName,
|
|
101
101
|
Namespace: highlight.tags.namespace,
|
|
102
|
+
"RendererDirective/Identifier": highlight.tags.annotation,
|
|
102
103
|
"( )": highlight.tags.paren,
|
|
103
104
|
"{ }": highlight.tags.brace,
|
|
104
105
|
"[ ]": highlight.tags.squareBracket,
|
|
@@ -110,24 +111,24 @@ const fizHighlighting = highlight.styleTags({
|
|
|
110
111
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
111
112
|
const parser = lr.LRParser.deserialize({
|
|
112
113
|
version: 14,
|
|
113
|
-
states: "
|
|
114
|
-
stateData: ")
|
|
115
|
-
goto: "
|
|
116
|
-
nodeNames: "⚠ Unit LineComment BlockComment Recipe Call Identifier ) ( ArgList RhsVariable QualifiableIdentifier . } { StyleArgList StyleDeclaration PropertyName : ColorLiteral NumberLiteral StringLiteral StyleTag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<Gx<<Gx",
|
|
115
|
+
stateData: ")q~O!SOS!TOSQOSROS~OUPOgVOmROpTOsWOuXOwYO~OW`O[^OmROpeO!QZX![ZX~O^aOjiX!WiX~PwOlfO~P`OW`O^aO!QkX![kX~OejO~OjmO!WkO~OUnO~OUoO~OUpO~OUqO~O!QrO![rO~OUuO~O[^O!QZa![ZaVZa!WZa]ZaeZagZa!PZa~OUwOVyO~O]!QOe!OOg}O!P{O~O^aO!QTa![TaVTa!WTa~OW`O^aO!Qka![ka~Oe!UO~Ol!VO~P`OU!WO~Oj!ZO!WkO~OU![OmROpTO~O^aO~OW`O[^OVZX!WZX~OV!dO!W!bO~Ob!eO~OU!fO~O]!iOe!OOg}O!P{O~O^aO!Qki![ki~O^aOjiX!WiX~OUwO~OV!nO!W!bO~Oc!pOe!pO!Y!oO~O[^O]ZXeZXgZX!PZX~OP!rO!QdX!WdX![dX~O!QrO!W!sO![rO~O!S!TU!T~",
|
|
116
|
+
goto: "&c![PPPPP!]PPP!m!]!xPPP#V#t#xPP#|P#tP$Q$WP$aPP$m$aP$Q$QP$QP$QP$y%T%^%d%j%pPPPPPP%v%|P&SP&YWZOR]gSx`!bQ!]mR!k!ZUbPw![QiSR!Td`QOR]`gm!Z!bR!g}ScP!WQhSQ!RbS!SdiQ!^nQ!_oQ!`pQ!aqR!j!TT!Oa!PT|a!PT!p!e!sXZOR]gWUOR]gR!XkWZOR]gQ!]mR!k!Z[SOR]gm!ZTdP![Q]OQgRTt]gW_Pw![!fRv_Q!czR!m!cQ!PaR!h!PQ!t!qR!w!tQlUR!YlX[OR]gQz`R!l!bQ!q!eR!v!sQsZQ!u!qR!x!t",
|
|
117
|
+
nodeNames: "⚠ Unit LineComment BlockComment Recipe Call Identifier ) ( ArgList RhsVariable QualifiableIdentifier . } { StyleArgList StyleDeclaration PropertyName : ColorLiteral NumberLiteral StringLiteral StyleTag # Assignment LhsVariable Eq Namespace ] [ StatementList Import @ StyleTagDeclaration StyleBinding % GlobalStyleBinding * RendererDirective ^",
|
|
118
|
+
maxTerm: 58,
|
|
118
119
|
context: trackNewline,
|
|
119
120
|
nodeProps: [
|
|
120
|
-
["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-
|
|
121
|
+
["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-7,24,27,31,33,34,36,38,"Statement"],
|
|
121
122
|
["openedBy", 7,"(",13,"{",28,"["],
|
|
122
123
|
["closedBy", 8,")",14,"}",29,"]"]
|
|
123
124
|
],
|
|
124
125
|
propSources: [fizHighlighting],
|
|
125
126
|
skippedNodes: [0,2,3],
|
|
126
127
|
repeatNodeCount: 6,
|
|
127
|
-
tokenData: "
|
|
128
|
+
tokenData: "3X~R!SXY$_YZ%SZ[$_]^%Spq$_rs%Xst&{tu)^uv*Rwx*Wxy+uyz+zz{,P{|,U|}-p}!O,U!O!P-u!P!Q-}!Q![-_![!]/v!]!^/{!_!`0Q!b!c0V!c!})^!}#O0[#P#Q0a#Q#R0f#R#S)^#T#o)^#o#p0k#q#r0p$f$g$_$g#BY)^#BY#BZ0u#BZ$IS)^$IS$I_0u$I_$I|)^$I|$I}2h$I}$JO2h$JO$JT)^$JT$JU0u$JU$KV)^$KV$KW0u$KW&FU)^&FU&FV0u&FV;'S)^;'S;=`){<%l?HT)^?HT?HU0u?HUO)^~$dY!S~XY$_Z[$_pq$_$f$g$_#BY#BZ$_$IS$I_$_$JT$JU$_$KV$KW$_&FU&FV$_?HT?HU$_~%XO!T~~%[WOY%XZr%Xrs%ts#O%X#O#P%y#P;'S%X;'S;=`&u<%lO%X~%yOe~~%|RO;'S%X;'S;=`&V;=`O%X~&YXOY%XZr%Xrs%ts#O%X#O#P%y#P;'S%X;'S;=`&u;=`<%l%X<%lO%X~&xP;=`<%l%XR'QRgP!Q!['Z!c!i'Z#T#Z'ZQ'^R!Q!['g!c!i'g#T#Z'gQ'jR!Q!['s!c!i's#T#Z'sQ'xRcQ!Q![(R!c!i(R#T#Z(RQ(WRcQ!Q![(a!c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
tokenPrec: 396
|
|
131
132
|
});
|
|
132
133
|
|
|
133
134
|
exports.parser = parser;
|
package/dist/index.es.js
CHANGED
|
@@ -3,10 +3,10 @@ import { styleTags, tags } from '@lezer/highlight';
|
|
|
3
3
|
|
|
4
4
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
5
5
|
const Unit = 1,
|
|
6
|
-
cssIdentifier =
|
|
7
|
-
insertSemi =
|
|
8
|
-
spaces =
|
|
9
|
-
newline =
|
|
6
|
+
cssIdentifier = 47,
|
|
7
|
+
insertSemi = 48,
|
|
8
|
+
spaces = 50,
|
|
9
|
+
newline = 51,
|
|
10
10
|
LineComment = 2,
|
|
11
11
|
BlockComment = 3;
|
|
12
12
|
|
|
@@ -97,6 +97,7 @@ const fizHighlighting = styleTags({
|
|
|
97
97
|
Unit: tags.unit,
|
|
98
98
|
StyleTag: tags.tagName,
|
|
99
99
|
Namespace: tags.namespace,
|
|
100
|
+
"RendererDirective/Identifier": tags.annotation,
|
|
100
101
|
"( )": tags.paren,
|
|
101
102
|
"{ }": tags.brace,
|
|
102
103
|
"[ ]": tags.squareBracket,
|
|
@@ -108,24 +109,24 @@ const fizHighlighting = styleTags({
|
|
|
108
109
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
109
110
|
const parser = LRParser.deserialize({
|
|
110
111
|
version: 14,
|
|
111
|
-
states: "
|
|
112
|
-
stateData: ")
|
|
113
|
-
goto: "
|
|
114
|
-
nodeNames: "⚠ Unit LineComment BlockComment Recipe Call Identifier ) ( ArgList RhsVariable QualifiableIdentifier . } { StyleArgList StyleDeclaration PropertyName : ColorLiteral NumberLiteral StringLiteral StyleTag # Assignment LhsVariable Eq Namespace ] [ StatementList Import @ StyleTagDeclaration StyleBinding % GlobalStyleBinding *",
|
|
115
|
-
maxTerm:
|
|
112
|
+
states: ",`Q`QSOOO!]QdO'#CgOOQ`'#Cf'#CfO!jQSO'#CzO!qQdO'#CwO#PQSO'#C{O#UQSO'#CtO#^QSO'#C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^O!QZa![ZaVZa!WZa]ZaeZagZa!PZa~OUwOVyO~O]!QOe!OOg}O!P{O~O^aO!QTa![TaVTa!WTa~OW`O^aO!Qka![ka~Oe!UO~Ol!VO~P`OU!WO~Oj!ZO!WkO~OU![OmROpTO~O^aO~OW`O[^OVZX!WZX~OV!dO!W!bO~Ob!eO~OU!fO~O]!iOe!OOg}O!P{O~O^aO!Qki![ki~O^aOjiX!WiX~OUwO~OV!nO!W!bO~Oc!pOe!pO!Y!oO~O[^O]ZXeZXgZX!PZX~OP!rO!QdX!WdX![dX~O!QrO!W!sO![rO~O!S!TU!T~",
|
|
114
|
+
goto: "&c![PPPPP!]PPP!m!]!xPPP#V#t#xPP#|P#tP$Q$WP$aPP$m$aP$Q$QP$QP$QP$y%T%^%d%j%pPPPPPP%v%|P&SP&YWZOR]gSx`!bQ!]mR!k!ZUbPw![QiSR!Td`QOR]`gm!Z!bR!g}ScP!WQhSQ!RbS!SdiQ!^nQ!_oQ!`pQ!aqR!j!TT!Oa!PT|a!PT!p!e!sXZOR]gWUOR]gR!XkWZOR]gQ!]mR!k!Z[SOR]gm!ZTdP![Q]OQgRTt]gW_Pw![!fRv_Q!czR!m!cQ!PaR!h!PQ!t!qR!w!tQlUR!YlX[OR]gQz`R!l!bQ!q!eR!v!sQsZQ!u!qR!x!t",
|
|
115
|
+
nodeNames: "⚠ Unit LineComment BlockComment Recipe Call Identifier ) ( ArgList RhsVariable QualifiableIdentifier . } { StyleArgList StyleDeclaration PropertyName : ColorLiteral NumberLiteral StringLiteral StyleTag # Assignment LhsVariable Eq Namespace ] [ StatementList Import @ StyleTagDeclaration StyleBinding % GlobalStyleBinding * RendererDirective ^",
|
|
116
|
+
maxTerm: 58,
|
|
116
117
|
context: trackNewline,
|
|
117
118
|
nodeProps: [
|
|
118
|
-
["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-
|
|
119
|
+
["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-7,24,27,31,33,34,36,38,"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w*Wwx%tx#O*W#O#P*s#P;'S*W;'S;=`+o<%lO*W~*vRO;'S*W;'S;=`+P;=`O*W~+SXOY*WZw*Wwx%tx#O*W#O#P*s#P;'S*W;'S;=`+o;=`<%l*W<%lO*W~+rP;=`<%l*W~+zOW~~,POV~~,UOu~Q,XQ!O!P,_!Q![-_Q,bP!Q![,eQ,jR!YQ!Q![,e!g!h,s#X#Y,sQ,vR{|-P}!O-P!Q![-VQ-SP!Q![-VQ-[P!YQ!Q![-VQ-dS!YQ!O!P,e!Q![-_!g!h,s#X#Y,s~-uO!W~R-zP[P!Q![,e~.QQz{.W!P!Q/_~.ZTOz.Wz{.j{;'S.W;'S;=`/X<%lO.W~.mVOz.Wz{.j{!P.W!P!Q/S!Q;'S.W;'S;=`/X<%lO.W~/XOR~~/[P;=`<%l.W~/dSQ~OY/_Z;'S/_;'S;=`/p<%lO/_~/sP;=`<%l/_~/{Ob~~0QO![~~0VOj~~0[Op~~0aOm~~0fOl~~0kOw~~0pO^~~0uO]~~0|h!S~U~XY$_Z[$_pq$_tu)^!Q![)^!c!})^#R#S)^#T#o)^$f$g$_$g#BY)^#BY#BZ0u#BZ$IS)^$IS$I_0u$I_$JT)^$JT$JU0u$JU$KV)^$KV$KW0u$KW&FU)^&FU&FV0u&FV;'S)^;'S;=`){<%l?HT)^?HT?HU0u?HUO)^~2oW!T~U~tu)^!Q![)^!c!})^#R#S)^#T#o)^$g;'S)^;'S;=`){<%lO)^",
|
|
126
127
|
tokenizers: [unitToken, cssIdentifierToken, 0, 1, insertSemicolon],
|
|
127
128
|
topRules: {"Recipe":[0,4]},
|
|
128
|
-
tokenPrec:
|
|
129
|
+
tokenPrec: 396
|
|
129
130
|
});
|
|
130
131
|
|
|
131
132
|
export { parser };
|
package/package.json
CHANGED
package/src/fiz.grammar
CHANGED
|
@@ -8,6 +8,7 @@ statement[@isGroup=Statement] {
|
|
|
8
8
|
StyleTagDeclaration |
|
|
9
9
|
StyleBinding |
|
|
10
10
|
GlobalStyleBinding |
|
|
11
|
+
RendererDirective |
|
|
11
12
|
Namespace |
|
|
12
13
|
Import
|
|
13
14
|
)
|
|
@@ -53,6 +54,8 @@ StyleBinding { "%" Identifier StyleArgList }
|
|
|
53
54
|
|
|
54
55
|
GlobalStyleBinding { "*" Identifier StyleArgList }
|
|
55
56
|
|
|
57
|
+
RendererDirective { "^" Identifier StyleArgList }
|
|
58
|
+
|
|
56
59
|
StatementList { "[" statement* "]" }
|
|
57
60
|
|
|
58
61
|
Namespace { Identifier? StatementList ArgList? StyleArgList? }
|
|
@@ -111,6 +114,8 @@ Import { Identifier? "@" StringLiteral }
|
|
|
111
114
|
|
|
112
115
|
"*"
|
|
113
116
|
|
|
117
|
+
"^"
|
|
118
|
+
|
|
114
119
|
"(" ")" "{" "}" "[" "]"
|
|
115
120
|
|
|
116
121
|
}
|
package/src/highlight.js
CHANGED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Empty Renderer Directive
|
|
2
|
+
|
|
3
|
+
^cytoscape{}
|
|
4
|
+
|
|
5
|
+
==>
|
|
6
|
+
|
|
7
|
+
Recipe(
|
|
8
|
+
RendererDirective(Identifier, StyleArgList())
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
# Renderer Directive with Style Declarations
|
|
12
|
+
|
|
13
|
+
^cytoscape{
|
|
14
|
+
rankDir: "LR"
|
|
15
|
+
background-color: #ff0000
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
==>
|
|
19
|
+
|
|
20
|
+
Recipe(
|
|
21
|
+
RendererDirective(
|
|
22
|
+
Identifier,
|
|
23
|
+
StyleArgList(
|
|
24
|
+
StyleDeclaration(PropertyName, StringLiteral),
|
|
25
|
+
StyleDeclaration(PropertyName, ColorLiteral)
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
# Renderer Directive with StyleTags
|
|
31
|
+
|
|
32
|
+
^cytoscape{
|
|
33
|
+
#compact #dark
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
==>
|
|
37
|
+
|
|
38
|
+
Recipe(
|
|
39
|
+
RendererDirective(
|
|
40
|
+
Identifier,
|
|
41
|
+
StyleArgList(
|
|
42
|
+
StyleTag(QualifiableIdentifier(Identifier)),
|
|
43
|
+
StyleTag(QualifiableIdentifier(Identifier))
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
# Renderer Directive with Qualified StyleTag
|
|
49
|
+
|
|
50
|
+
^cytoscape{ #themes.compact }
|
|
51
|
+
|
|
52
|
+
==>
|
|
53
|
+
|
|
54
|
+
Recipe(
|
|
55
|
+
RendererDirective(
|
|
56
|
+
Identifier,
|
|
57
|
+
StyleArgList(
|
|
58
|
+
StyleTag(QualifiableIdentifier(Identifier, Identifier))
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
# Renderer Directive Mixed Content
|
|
64
|
+
|
|
65
|
+
^cytoscape{
|
|
66
|
+
#base
|
|
67
|
+
rankDir: "TB"
|
|
68
|
+
"note"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
==>
|
|
72
|
+
|
|
73
|
+
Recipe(
|
|
74
|
+
RendererDirective(
|
|
75
|
+
Identifier,
|
|
76
|
+
StyleArgList(
|
|
77
|
+
StyleTag(QualifiableIdentifier(Identifier)),
|
|
78
|
+
StyleDeclaration(PropertyName, StringLiteral),
|
|
79
|
+
StringLiteral
|
|
80
|
+
)
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Multiple Renderer Directives
|
|
85
|
+
|
|
86
|
+
^cytoscape{ rankDir: "LR" }
|
|
87
|
+
^minimal{ x: "y" }
|
|
88
|
+
|
|
89
|
+
==>
|
|
90
|
+
|
|
91
|
+
Recipe(
|
|
92
|
+
RendererDirective(
|
|
93
|
+
Identifier,
|
|
94
|
+
StyleArgList(StyleDeclaration(PropertyName, StringLiteral))
|
|
95
|
+
)
|
|
96
|
+
RendererDirective(
|
|
97
|
+
Identifier,
|
|
98
|
+
StyleArgList(StyleDeclaration(PropertyName, StringLiteral))
|
|
99
|
+
)
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Renderer Directive Alongside Global Style Binding
|
|
103
|
+
|
|
104
|
+
*node{ color: #abc }
|
|
105
|
+
^cytoscape{ rankDir: "RL" }
|
|
106
|
+
|
|
107
|
+
==>
|
|
108
|
+
|
|
109
|
+
Recipe(
|
|
110
|
+
GlobalStyleBinding(
|
|
111
|
+
Identifier,
|
|
112
|
+
StyleArgList(StyleDeclaration(PropertyName, ColorLiteral))
|
|
113
|
+
)
|
|
114
|
+
RendererDirective(
|
|
115
|
+
Identifier,
|
|
116
|
+
StyleArgList(StyleDeclaration(PropertyName, StringLiteral))
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
# Renderer Directive with Semicolons
|
|
121
|
+
|
|
122
|
+
^cytoscape{ rankDir: "LR"; background-color: "#fff" };
|
|
123
|
+
|
|
124
|
+
==>
|
|
125
|
+
|
|
126
|
+
Recipe(
|
|
127
|
+
RendererDirective(
|
|
128
|
+
Identifier,
|
|
129
|
+
StyleArgList(
|
|
130
|
+
StyleDeclaration(PropertyName, StringLiteral),
|
|
131
|
+
StyleDeclaration(PropertyName, StringLiteral)
|
|
132
|
+
)
|
|
133
|
+
)
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
# Renderer Directive in a StatementList
|
|
137
|
+
|
|
138
|
+
ns[
|
|
139
|
+
^cytoscape{ rankDir: "LR" }
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
==>
|
|
143
|
+
|
|
144
|
+
Recipe(
|
|
145
|
+
Namespace(
|
|
146
|
+
Identifier,
|
|
147
|
+
StatementList(
|
|
148
|
+
RendererDirective(
|
|
149
|
+
Identifier,
|
|
150
|
+
StyleArgList(StyleDeclaration(PropertyName, StringLiteral))
|
|
151
|
+
)
|
|
152
|
+
)
|
|
153
|
+
)
|
|
154
|
+
)
|