functionalscript 0.0.452 → 0.0.454

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.
Files changed (2) hide show
  1. package/fsm/README.md +13 -2
  2. package/package.json +1 -1
package/fsm/README.md CHANGED
@@ -27,8 +27,19 @@ id2 ::= `_$a..zA..Z0..9` id2
27
27
  ### FA
28
28
 
29
29
  ```js
30
+ const lowercaseAlpha = byteSet.range('a')('z')
31
+ const uppercaseAlpha = byteSet.range('A')('Z')
32
+ const alpha = byteSet.union(lowercaseAlpha)(uppercaseAlpha)
33
+ const idSymbol = byteSet.union(byteSet.one('_'))(byteSet.one('$'))
34
+ const idBegin = byteSet.union(alpha)(idSymbol)
35
+
36
+ const digit = byteSet.range('0')('9')
37
+ const idNext = byteSet.union(idBegin)(digit)
38
+
30
39
  const grammar = [
31
- ['init', toByteSet('_$a..zA..Z'), 'id'],
32
- ['id', toByteSet('_$a..zA..Z0..9'), 'id'],
40
+ ['init', digit, 'int'],
41
+ ['int', digit, 'int'],
42
+ ['init', idBegin, 'id'],
43
+ ['id', idNext, 'id'],
33
44
  ]
34
45
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functionalscript",
3
- "version": "0.0.452",
3
+ "version": "0.0.454",
4
4
  "description": "FunctionalScript is a functional subset of JavaScript",
5
5
  "main": "module.f.cjs",
6
6
  "scripts": {