@formulavize/lezer-fiz 2.0.0 → 2.1.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 +12 -12
- package/dist/index.es.js +12 -12
- package/package.json +2 -2
- package/src/fiz.grammar +5 -0
- package/test/styling.txt +75 -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 = 45,
|
|
9
|
+
insertSemi = 46,
|
|
10
|
+
spaces = 48,
|
|
11
|
+
newline = 49,
|
|
12
12
|
LineComment = 2,
|
|
13
13
|
BlockComment = 3;
|
|
14
14
|
|
|
@@ -110,24 +110,24 @@ const fizHighlighting = highlight.styleTags({
|
|
|
110
110
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
111
111
|
const parser = lr.LRParser.deserialize({
|
|
112
112
|
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 # Assignment LhsVariable Eq Namespace ] [ StatementList Import @ StyleTagDeclaration StyleBinding %",
|
|
117
|
-
maxTerm:
|
|
113
|
+
states: "+|Q`QSOOO!YQdO'#CgOOQ`'#Cf'#CfO!gQSO'#CzO!nQdO'#CwO!|QSO'#C{O#RQSO'#CtO#ZQSO'#C}O#`QSO'#DOO#eQSO'#DQO#jQdO'#D`OOQO'#DS'#DSQ`QSOOO#rQSO'#DTO#wQfO,59RO$fQSO'#CeO$nQUO'#CkO$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pTO~O^`O~OW_O[]OVZX!UZX~OV!aO!U!_O~Ob!bO~OU!cO~O]!fOe|Og{O}yO~O^`O!Oki!Yki~O^`OjiX!UiX~OUuO~OV!kO!U!_O~Oc!mOe!mO!W!lO~O[]O]ZXeZXgZX}ZX~OP!oO!OdX!UdX!YdX~O!OpO!U!pO!YpO~O!Q!RU!R~",
|
|
115
|
+
goto: "&^!YPPPPP!ZPPP!k!Z!vPPP#T#o#sPP#wP#oP#{$RP$[PP$h$[P#{#{P#{P$t%O%X%_%e%kPPPPPP%q%wP%}P&TWYOR[fSv_!_Q!ZlR!h!XUaPu!YQhSR!Rc`QOR[_fl!X!_R!d{SbP!UQgSQ!PaS!QchQ![mQ!]nQ!^oR!g!RT|`}Tz`}T!m!b!pXYOR[fWUOR[fR!VjWYOR[fQ!ZlR!h!X[SOR[fl!XTcP!YQ[OQfRTr[fW^Pu!Y!cRt^Q!`xR!j!`Q}`R!e}Q!q!nR!t!qQkUR!WkXZOR[fQx_R!i!_Q!n!bR!s!pQqYQ!r!nR!u!q",
|
|
116
|
+
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 *",
|
|
117
|
+
maxTerm: 56,
|
|
118
118
|
context: trackNewline,
|
|
119
119
|
nodeProps: [
|
|
120
|
-
["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-
|
|
120
|
+
["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-6,24,27,31,33,34,36,"Statement"],
|
|
121
121
|
["openedBy", 7,"(",13,"{",28,"["],
|
|
122
122
|
["closedBy", 8,")",14,"}",29,"]"]
|
|
123
123
|
],
|
|
124
124
|
propSources: [fizHighlighting],
|
|
125
125
|
skippedNodes: [0,2,3],
|
|
126
126
|
repeatNode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~~+|OV~~,ROu~Q,UQ!O!P,[!Q![-[Q,_P!Q![,bQ,gR!WQ!Q![,b!g!h,p#X#Y,pQ,sR{|,|}!O,|!Q![-SQ-PP!Q![-SQ-XP!WQ!Q![-SQ-aS!WQ!O!P,b!Q![-[!g!h,p#X#Y,p~-rO!U~R-wP[P!Q![,b~-}Qz{.T!P!Q/[~.WTOz.Tz{.g{;'S.T;'S;=`/U<%lO.T~.jVOz.Tz{.g{!P.T!P!Q/P!Q;'S.T;'S;=`/U<%lO.T~/UOR~~/XP;=`<%l.T~/aSQ~OY/[Z;'S/[;'S;=`/m<%lO/[~/pP;=`<%l/[~/xOb~~/}O!Y~~0SOj~~0XOp~~0^Om~~0cOl~~0hO^~~0mO]~~0th!Q~U~XY$[Z[$[pq$[tu)Z!Q![)Z!c!})Z#R#S)Z#T#o)Z$f$g$[$g#BY)Z#BY#BZ0m#BZ$IS)Z$IS$I_0m$I_$JT)Z$JT$JU0m$JU$KV)Z$KV$KW0m$KW&FU)Z&FU&FV0m&FV;'S)Z;'S;=`)x<%l?HT)Z?HT?HU0m?HUO)Z~2gW!R~U~tu)Z!Q![)Z!c!})Z#R#S)Z#T#o)Z$g;'S)Z;'S;=`)x<%lO)Z",
|
|
128
128
|
tokenizers: [unitToken, cssIdentifierToken, 0, 1, insertSemicolon],
|
|
129
129
|
topRules: {"Recipe":[0,4]},
|
|
130
|
-
tokenPrec:
|
|
130
|
+
tokenPrec: 388
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
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 = 45,
|
|
7
|
+
insertSemi = 46,
|
|
8
|
+
spaces = 48,
|
|
9
|
+
newline = 49,
|
|
10
10
|
LineComment = 2,
|
|
11
11
|
BlockComment = 3;
|
|
12
12
|
|
|
@@ -108,24 +108,24 @@ const fizHighlighting = styleTags({
|
|
|
108
108
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
109
109
|
const parser = LRParser.deserialize({
|
|
110
110
|
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 %",
|
|
115
|
-
maxTerm:
|
|
111
|
+
states: "+|Q`QSOOO!YQdO'#CgOOQ`'#Cf'#CfO!gQSO'#CzO!nQdO'#CwO!|QSO'#C{O#RQSO'#CtO#ZQSO'#C}O#`QSO'#DOO#eQSO'#DQO#jQdO'#D`OOQO'#DS'#DSQ`QSOOO#rQSO'#DTO#wQfO,59RO$fQSO'#CeO$nQUO'#CkO$|QdO,58{OOQO,59a,59aO%_QdO,59cO%mQSO,59gOOQ`,59f,59fO%rQSO,59fOOQ`,59c,59cO%bQdO,59cOOQ`,59g,59gO%yQSO'#DXO&OQSO,59`O&WQSO,59`O&cQSO,59iO&cQSO,59jO&cQSO,59lOOQQ'#De'#DeOOQO,59z,59zOOQO-E7Q-E7QOOQb,59o,59oOOQb-E7R-E7RO&hQSO'#CgOOQO'#Da'#DaOOQ`,59P,59PO&vQSO,59POOQO'#Cm'#CmO'OQSO'#ClO'TQSO'#CrOOQQ'#DV'#DVO'YQUO,59VOOQ`,59V,59VOOQ`1G.g1G.gOOQ`1G.}1G.}O'hQdO1G.}OOQ`1G/R1G/ROOQ`1G/Q1G/QO'sQSO'#CuOOQO,59s,59sOOQO-E7V-E7VO&WQSO1G.zOtQdO'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ZlR!h!X[SOR[fl!XTcP!YQ[OQfRTr[fW^Pu!Y!cRt^Q!`xR!j!`Q}`R!e}Q!q!nR!t!qQkUR!WkXZOR[fQx_R!i!_Q!n!bR!s!pQqYQ!r!nR!u!q",
|
|
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: 56,
|
|
116
116
|
context: trackNewline,
|
|
117
117
|
nodeProps: [
|
|
118
|
-
["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-
|
|
118
|
+
["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-6,24,27,31,33,34,36,"Statement"],
|
|
119
119
|
["openedBy", 7,"(",13,"{",28,"["],
|
|
120
120
|
["closedBy", 8,")",14,"}",29,"]"]
|
|
121
121
|
],
|
|
122
122
|
propSources: [fizHighlighting],
|
|
123
123
|
skippedNodes: [0,2,3],
|
|
124
124
|
repeatNodeCount: 6,
|
|
125
|
-
tokenData: "
|
|
125
|
+
tokenData: "3P~R!RXY$[YZ%PZ[$[]^%Ppq$[rs%Ust&xtu)Zuv*Owx*Txy+ryz+wz{+|{|,R|}-m}!O,R!O!P-r!P!Q-z!Q![-[![!]/s!]!^/x!_!`/}!b!c0S!c!})Z!}#O0X#P#Q0^#R#S)Z#T#o)Z#o#p0c#q#r0h$f$g$[$g#BY)Z#BY#BZ0m#BZ$IS)Z$IS$I_0m$I_$I|)Z$I|$I}2`$I}$JO2`$JO$JT)Z$JT$JU0m$JU$KV)Z$KV$KW0m$KW&FU)Z&FU&FV0m&FV;'S)Z;'S;=`)x<%l?HT)Z?HT?HU0m?HUO)Z~$aY!Q~XY$[Z[$[pq$[$f$g$[#BY#BZ$[$IS$I_$[$JT$JU$[$KV$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z#R#S)Z#T#o)Z$f$g$[$g#BY)Z#BY#BZ0m#BZ$IS)Z$IS$I_0m$I_$JT)Z$JT$JU0m$JU$KV)Z$KV$KW0m$KW&FU)Z&FU&FV0m&FV;'S)Z;'S;=`)x<%l?HT)Z?HT?HU0m?HUO)Z~2gW!R~U~tu)Z!Q![)Z!c!})Z#R#S)Z#T#o)Z$g;'S)Z;'S;=`)x<%lO)Z",
|
|
126
126
|
tokenizers: [unitToken, cssIdentifierToken, 0, 1, insertSemicolon],
|
|
127
127
|
topRules: {"Recipe":[0,4]},
|
|
128
|
-
tokenPrec:
|
|
128
|
+
tokenPrec: 388
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
export { parser };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formulavize/lezer-fiz",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "fiz grammar for lezer",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"npm-run-all": "^4.1.5",
|
|
22
22
|
"only-allow": "^1.2.2",
|
|
23
23
|
"prettier": "^3.8.1",
|
|
24
|
-
"rollup": "^4.
|
|
24
|
+
"rollup": "^4.60.1"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
27
|
"node": ">=24.0",
|
package/src/fiz.grammar
CHANGED
|
@@ -7,6 +7,7 @@ statement[@isGroup=Statement] {
|
|
|
7
7
|
Assignment |
|
|
8
8
|
StyleTagDeclaration |
|
|
9
9
|
StyleBinding |
|
|
10
|
+
GlobalStyleBinding |
|
|
10
11
|
Namespace |
|
|
11
12
|
Import
|
|
12
13
|
)
|
|
@@ -50,6 +51,8 @@ StyleArgList { "{" (StyleDeclaration | StyleTag | StringLiteral)* "}" }
|
|
|
50
51
|
|
|
51
52
|
StyleBinding { "%" Identifier StyleArgList }
|
|
52
53
|
|
|
54
|
+
GlobalStyleBinding { "*" Identifier StyleArgList }
|
|
55
|
+
|
|
53
56
|
StatementList { "[" statement* "]" }
|
|
54
57
|
|
|
55
58
|
Namespace { Identifier? StatementList ArgList? StyleArgList? }
|
|
@@ -106,6 +109,8 @@ Import { Identifier? "@" StringLiteral }
|
|
|
106
109
|
|
|
107
110
|
"@"
|
|
108
111
|
|
|
112
|
+
"*"
|
|
113
|
+
|
|
109
114
|
"(" ")" "{" "}" "[" "]"
|
|
110
115
|
|
|
111
116
|
}
|
package/test/styling.txt
CHANGED
|
@@ -292,6 +292,81 @@ Recipe(
|
|
|
292
292
|
)
|
|
293
293
|
)
|
|
294
294
|
|
|
295
|
+
# Global Style Binding with StyleTags
|
|
296
|
+
|
|
297
|
+
*nodes{}
|
|
298
|
+
*edges{
|
|
299
|
+
#x #y
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
==>
|
|
303
|
+
|
|
304
|
+
Recipe(
|
|
305
|
+
GlobalStyleBinding(Identifier, StyleArgList())
|
|
306
|
+
GlobalStyleBinding(
|
|
307
|
+
Identifier,
|
|
308
|
+
StyleArgList(
|
|
309
|
+
StyleTag(QualifiableIdentifier(Identifier))
|
|
310
|
+
StyleTag(QualifiableIdentifier(Identifier)),
|
|
311
|
+
)
|
|
312
|
+
)
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
# Global Style Binding with Style Declarations
|
|
316
|
+
|
|
317
|
+
*nodes{
|
|
318
|
+
color: #ff0000
|
|
319
|
+
font-size: 12px
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
==>
|
|
323
|
+
|
|
324
|
+
Recipe(
|
|
325
|
+
GlobalStyleBinding(
|
|
326
|
+
Identifier,
|
|
327
|
+
StyleArgList(
|
|
328
|
+
StyleDeclaration(PropertyName, ColorLiteral),
|
|
329
|
+
StyleDeclaration(PropertyName, NumberLiteral(Unit))
|
|
330
|
+
)
|
|
331
|
+
)
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
# Global Style Binding with StringLiteral
|
|
335
|
+
|
|
336
|
+
*nodes{
|
|
337
|
+
"description"
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
==>
|
|
341
|
+
|
|
342
|
+
Recipe(
|
|
343
|
+
GlobalStyleBinding(
|
|
344
|
+
Identifier,
|
|
345
|
+
StyleArgList(StringLiteral)
|
|
346
|
+
)
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
# Global Style Binding Mixed Content
|
|
350
|
+
|
|
351
|
+
*nodes{
|
|
352
|
+
#base
|
|
353
|
+
color: #abc
|
|
354
|
+
"note"
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
==>
|
|
358
|
+
|
|
359
|
+
Recipe(
|
|
360
|
+
GlobalStyleBinding(
|
|
361
|
+
Identifier,
|
|
362
|
+
StyleArgList(
|
|
363
|
+
StyleTag(QualifiableIdentifier(Identifier)),
|
|
364
|
+
StyleDeclaration(PropertyName, ColorLiteral),
|
|
365
|
+
StringLiteral
|
|
366
|
+
)
|
|
367
|
+
)
|
|
368
|
+
)
|
|
369
|
+
|
|
295
370
|
# Description Shortcut
|
|
296
371
|
|
|
297
372
|
#a{
|