@formulavize/lezer-fiz 1.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.
@@ -19,12 +19,12 @@ jobs:
19
19
  - name: Install pnpm
20
20
  uses: pnpm/action-setup@v4
21
21
  with:
22
- version: 9
22
+ version: 10
23
23
 
24
24
  - name: Set up Node.js
25
25
  uses: actions/setup-node@v4
26
26
  with:
27
- node-version: 20
27
+ node-version: 24
28
28
  cache: pnpm
29
29
 
30
30
  - run: pnpm install --frozen-lockfile
package/dist/index.cjs CHANGED
@@ -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: ",`Q`QSOOO!VQdO'#CgOOQ`'#Cf'#CfO!dQSO'#CzO!kQdO'#CwO!yQSO'#C{O#OQSO'#CtO#WQSO'#C}O#]QSO'#DOO#bQdO'#D`OOQO'#DR'#DRQ`QSOOO#jQSO'#DSO#oQfO,59RO$^QSO'#CeO$fQUO'#CkO$tQdO,58{OOQO,59a,59aO%VQdO,59cO%eQSO,59gOOQ`,59f,59fO%jQSO,59fOOQ`,59c,59cO%YQdO,59cOOQ`,59g,59gO%qQSO'#DWO%vQSO,59`O&OQSO,59`O&ZQSO,59iO&`QSO,59jOOQQ'#De'#DeOOQO,59z,59zOOQO-E7P-E7POOQb,59n,59nOOQb-E7Q-E7QO&eQSO'#CgOOQO'#Da'#DaOOQ`,59P,59PO&sQSO,59POOQO'#Cm'#CmO&{QSO'#ClO'QQSO'#CrOOQQ'#DU'#DUO'VQUO,59VOOQ`,59V,59VOOQ`1G.g1G.gOOQ`1G.}1G.}O'eQdO1G.}OOQ`1G/R1G/ROOQ`1G/Q1G/QO'pQSO'#CuOOQO,59r,59rOOQO-E7U-E7UO&OQSO1G.zOqQdO'#CgOOQ`1G.z1G.zOOQ`1G/T1G/TO'{QSO'#DQO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R!TiWXORZeQ!XkR!f!V[SORZek!VTbP!WR![mQZOQeRTpZeW]Ps!W!aRr]Q!^vR!k!^Q{_R!c{Q!t!oR!w!tQjUR!UjQ!h!ZR!p!hXYORZeQv^R!j!]Q!o!`R!v!sQoXQ!u!oR!x!t",
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 % StyleTagList",
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$|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'#CgOOQ`1G.z1G.zOOQ`1G/T1G/TOOQ`1G/U1G/UOOQ`1G/W1G/WO(OQSO'#DUO(TQSO1G.kOOQ`1G.k1G.kO(]QWO,59WO(hQUO'#CgOOQQ,59^,59^OO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: "⚠ 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
117
  maxTerm: 56,
118
118
  context: trackNewline,
119
119
  nodeProps: [
120
- ["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-5,24,27,31,33,34,"Statement"],
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
- repeatNodeCount: 7,
127
- tokenData: "2w~R!QXY$XYZ$|Z[$X]^$|pq$Xrs%Rst&utu)Wuv){wx*Qxy+oyz+t{|+y|}-e}!O+y!O!P-j!P!Q-r!Q![-S![!]/k!]!^/p!_!`/u!b!c/z!c!})W!}#O0P#P#Q0U#R#S)W#T#o)W#o#p0Z#q#r0`$f$g$X$g#BY)W#BY#BZ0e#BZ$IS)W$IS$I_0e$I_$I|)W$I|$I}2W$I}$JO2W$JO$JT)W$JT$JU0e$JU$KV)W$KV$KW0e$KW&FU)W&FU&FV0e&FV;'S)W;'S;=`)u<%l?HT)W?HT?HU0e?HUO)W~$^Y!Q~XY$XZ[$Xpq$X$f$g$X#BY#BZ$X$IS$I_$X$JT$JU$X$KV$KW$X&FU&FV$X?HT?HU$X~%RO!R~~%UWOY%RZr%Rrs%ns#O%R#O#P%s#P;'S%R;'S;=`&o<%lO%R~%sOe~~%vRO;'S%R;'S;=`&P;=`O%R~&SXOY%RZr%Rrs%ns#O%R#O#P%s#P;'S%R;'S;=`&o;=`<%l%R<%lO%R~&rP;=`<%l%RR&zRgP!Q!['T!c!i'T#T#Z'TQ'WR!Q!['a!c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![-[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: 401
130
+ tokenPrec: 388
131
131
  });
132
132
 
133
133
  exports.parser = parser;
package/dist/index.es.js CHANGED
@@ -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: ",`Q`QSOOO!VQdO'#CgOOQ`'#Cf'#CfO!dQSO'#CzO!kQdO'#CwO!yQSO'#C{O#OQSO'#CtO#WQSO'#C}O#]QSO'#DOO#bQdO'#D`OOQO'#DR'#DRQ`QSOOO#jQSO'#DSO#oQfO,59RO$^QSO'#CeO$fQUO'#CkO$tQdO,58{OOQO,59a,59aO%VQdO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WOmROpTO~O^_O~O^!ZO~OW^O[[OVZX!UZX~OV!_O!U!]O~Ob!`O~OU!aO~O]!dOezOgyO}wO~O^_O!Oki!Yki~O^_OjiX!UiX~O]!iOgyO~OUsO~OV!lO!U!]O~Oc!nOe!nO!W!mO~O[[O]ZXeZXgZX}ZX~O]!qOgyO~OP!rO!OdX!UdX!YdX~O!OnO!U!sO!YnO~O!Q!RU!R~",
113
- goto: "&i!YPPPPP!ZPPP!k!Z!vPPP#T#i#mPP#qP#uP#}$TP$^PP$j$^P#}#}P$v$y%T%^%d%j%p%vPPPPPP%|&SP&YP&`WXORZeSt^!]Q!XkR!f!VU`Ps!WQgSR!Pb`QORZ^ek!V!]R!bySaP!SQfSQ}`S!ObgQ!YlR!e!PTz_{Tx_{T!n!`!sSz_{T!g!Z!hXXORZeWUORZeR!TiWXORZeQ!XkR!f!V[SORZek!VTbP!WR![mQZOQeRTpZeW]Ps!W!aRr]Q!^vR!k!^Q{_R!c{Q!t!oR!w!tQjUR!UjQ!h!ZR!p!hXYORZeQv^R!j!]Q!o!`R!v!sQoXQ!u!oR!x!t",
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 % StyleTagList",
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,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O~O[]O]ZXeZXgZX}ZX~OP!oO!OdX!UdX!YdX~O!OpO!U!pO!YpO~O!Q!RU!R~",
113
+ 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",
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
115
  maxTerm: 56,
116
116
  context: trackNewline,
117
117
  nodeProps: [
118
- ["group", -2,5,10,"Statement Value",-3,19,20,21,"StyleValue",-5,24,27,31,33,34,"Statement"],
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
- repeatNodeCount: 7,
125
- tokenData: "2w~R!QXY$XYZ$|Z[$X]^$|pq$Xrs%Rst&utu)Wuv){wx*Qxy+oyz+t{|+y|}-e}!O+y!O!P-j!P!Q-r!Q![-S![!]/k!]!^/p!_!`/u!b!c/z!c!})W!}#O0P#P#Q0U#R#S)W#T#o)W#o#p0Z#q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",
126
126
  tokenizers: [unitToken, cssIdentifierToken, 0, 1, insertSemicolon],
127
127
  topRules: {"Recipe":[0,4]},
128
- tokenPrec: 401
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": "1.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "fiz grammar for lezer",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",
@@ -11,21 +11,21 @@
11
11
  "module": "dist/index.es.js",
12
12
  "types": "dist/index.d.ts",
13
13
  "dependencies": {
14
- "@lezer/highlight": "^1.2.1",
15
- "@lezer/lr": "^1.4.2"
14
+ "@lezer/highlight": "^1.2.3",
15
+ "@lezer/lr": "^1.4.8"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@lezer/generator": "^1.8.0",
19
19
  "chokidar-cli": "^3.0.0",
20
- "mocha": "^11.7.1",
20
+ "mocha": "^11.7.5",
21
21
  "npm-run-all": "^4.1.5",
22
- "only-allow": "^1.2.1",
23
- "prettier": "^3.6.2",
24
- "rollup": "^4.45.3"
22
+ "only-allow": "^1.2.2",
23
+ "prettier": "^3.8.1",
24
+ "rollup": "^4.60.1"
25
25
  },
26
26
  "engines": {
27
- "node": ">=20",
28
- "pnpm": ">=9"
27
+ "node": ">=24.0",
28
+ "pnpm": ">=10"
29
29
  },
30
30
  "scripts": {
31
31
  "preinstall": "npx only-allow pnpm",
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
  )
@@ -20,7 +21,7 @@ Call { Identifier ArgList StyleArgList? }
20
21
  ArgList { "(" ( value ("," value)* )? ")" }
21
22
 
22
23
  value[@isGroup=Value] { RhsVariable | Call }
23
- // Though inconsistent with Assignment, we disallow Namespace and Imports in ArgList for clarity
24
+ // Though inconsistent with Assignment, we disallow Namespace and Imports in ArgList for readability
24
25
 
25
26
  RhsVariable { QualifiableIdentifier }
26
27
 
@@ -48,13 +49,9 @@ StyleTag { "#" QualifiableIdentifier }
48
49
 
49
50
  StyleArgList { "{" (StyleDeclaration | StyleTag | StringLiteral)* "}" }
50
51
 
51
- /* Only StyleTags are allowed in StyleBindings
52
- Although disallowing StyleDeclarations is inconsistent with other curly brackets
53
- (i.e. StyleArgList), this forces StyleBinding users to define StyleTags
54
- that can be reused by others */
55
- StyleTagList { "{" StyleTag* "}" }
52
+ StyleBinding { "%" Identifier StyleArgList }
56
53
 
57
- StyleBinding { "%" Identifier StyleTagList }
54
+ GlobalStyleBinding { "*" Identifier StyleArgList }
58
55
 
59
56
  StatementList { "[" statement* "]" }
60
57
 
@@ -112,6 +109,8 @@ Import { Identifier? "@" StringLiteral }
112
109
 
113
110
  "@"
114
111
 
112
+ "*"
113
+
115
114
  "(" ")" "{" "}" "[" "]"
116
115
 
117
116
  }
@@ -138,7 +138,7 @@ Recipe(
138
138
  Recipe(
139
139
  Namespace(
140
140
  StatementList(
141
- StyleBinding(Identifier, StyleTagList())
141
+ StyleBinding(Identifier, StyleArgList())
142
142
  )
143
143
  )
144
144
  )
@@ -70,7 +70,7 @@ Recipe(
70
70
  Recipe(
71
71
  StyleBinding(
72
72
  Identifier,
73
- StyleTagList(
73
+ StyleArgList(
74
74
  StyleTag(QualifiableIdentifier(Identifier, Identifier))
75
75
  )
76
76
  )
package/test/styling.txt CHANGED
@@ -217,7 +217,7 @@ Recipe(
217
217
  )
218
218
  )
219
219
 
220
- # Style Binding
220
+ # Style Binding with StyleTags
221
221
 
222
222
  %a{}
223
223
  %b{
@@ -227,16 +227,146 @@ Recipe(
227
227
  ==>
228
228
 
229
229
  Recipe(
230
- StyleBinding(Identifier, StyleTagList())
230
+ StyleBinding(Identifier, StyleArgList())
231
231
  StyleBinding(
232
232
  Identifier,
233
- StyleTagList(
233
+ StyleArgList(
234
234
  StyleTag(QualifiableIdentifier(Identifier))
235
235
  StyleTag(QualifiableIdentifier(Identifier)),
236
236
  )
237
237
  )
238
238
  )
239
239
 
240
+ # Style Binding with Style Declarations
241
+
242
+ %c{
243
+ color: #ff0000
244
+ font-size: 12px
245
+ }
246
+
247
+ ==>
248
+
249
+ Recipe(
250
+ StyleBinding(
251
+ Identifier,
252
+ StyleArgList(
253
+ StyleDeclaration(PropertyName, ColorLiteral),
254
+ StyleDeclaration(PropertyName, NumberLiteral(Unit))
255
+ )
256
+ )
257
+ )
258
+
259
+ # Style Binding with StringLiteral
260
+
261
+ %d{
262
+ "description"
263
+ }
264
+
265
+ ==>
266
+
267
+ Recipe(
268
+ StyleBinding(
269
+ Identifier,
270
+ StyleArgList(StringLiteral)
271
+ )
272
+ )
273
+
274
+ # Style Binding Mixed Content
275
+
276
+ %e{
277
+ #base
278
+ color: #abc
279
+ "note"
280
+ }
281
+
282
+ ==>
283
+
284
+ Recipe(
285
+ StyleBinding(
286
+ Identifier,
287
+ StyleArgList(
288
+ StyleTag(QualifiableIdentifier(Identifier)),
289
+ StyleDeclaration(PropertyName, ColorLiteral),
290
+ StringLiteral
291
+ )
292
+ )
293
+ )
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
+
240
370
  # Description Shortcut
241
371
 
242
372
  #a{