@bablr/language-en-cstml-json 0.1.0 → 0.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/lib/grammar.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /* @macrome
2
2
  * @generatedby @bablr/macrome-generator-bablr
3
- * @generatedfrom ./grammar.macro.js#0a642a38394d3786460fc65bbdb11a747007cd42
3
+ * @generatedfrom ./grammar.macro.js#9ffcbbc77664d07e4bf9c4a31213ed360b26c007
4
4
  * This file is autogenerated. Please do not edit it directly.
5
5
  * When editing run `npx macrome watch` then change the file this is generated from.
6
6
  */
7
7
  import _applyDecs from "@babel/runtime/helpers/applyDecs2305";
8
8
  var _JSON$grammar;
9
- let _initProto, _NaNDecs;
9
+ let _initProto, _NotANumberDecs, _UndefinedDecs;
10
10
  import { re, spam as m } from '@bablr/boot';
11
11
  import { extendLanguage, o, eat, match } from '@bablr/helpers/grammar';
12
12
  import { CoveredBy, Node, InjectFrom } from '@bablr/helpers/decorators';
@@ -26,20 +26,25 @@ export const getCooked = (escapeNode, span, ctx) => {
26
26
  };
27
27
  export const grammar = class BABLRVMInstructionGrammar extends (_JSON$grammar = JSON.grammar) {
28
28
  static {
29
- [_initProto] = _applyDecs(this, [[_NaNDecs, 2, "NaN"]], [], 0, void 0, _JSON$grammar).e;
29
+ [_initProto] = _applyDecs(this, [[_NotANumberDecs, 2, "NotANumber"], [_UndefinedDecs, 2, "Undefined"]], [], 0, void 0, _JSON$grammar).e;
30
30
  }
31
31
  constructor(...args) {
32
32
  super(...args);
33
33
  _initProto(this);
34
34
  }
35
- *[(_NaNDecs = [CoveredBy('Expression'), Node], "Expression")](props) {
35
+ *[(_NotANumberDecs = [CoveredBy('Expression'), Node], _UndefinedDecs = [CoveredBy('Expression'), Node], "Expression")](props) {
36
36
  if (yield match('NaN')) {
37
- yield eat(m`<NaN />`);
37
+ yield eat(m`<NotANumber />`);
38
+ } else if (yield match('undefined')) {
39
+ yield eat(m`<Undefined />`);
38
40
  } else {
39
41
  yield* super.Expression(props);
40
42
  }
41
43
  }
42
- *NaN() {
44
+ *NotANumber() {
43
45
  yield eat(m`sigilToken: <*Keyword 'NaN' />`);
44
46
  }
47
+ *Undefined() {
48
+ yield eat(m`sigilToken: <*Keyword 'undefined' />`);
49
+ }
45
50
  };
@@ -22,7 +22,9 @@ export const getCooked = (escapeNode, span, ctx) => {
22
22
  export const grammar = class BABLRVMInstructionGrammar extends JSON.grammar {
23
23
  *Expression(props) {
24
24
  if (yield match('NaN')) {
25
- yield eat(m`<NaN />`);
25
+ yield eat(m`<NotANumber />`);
26
+ } else if (yield match('undefined')) {
27
+ yield eat(m`<Undefined />`);
26
28
  } else {
27
29
  yield* super.Expression(props);
28
30
  }
@@ -30,7 +32,13 @@ export const grammar = class BABLRVMInstructionGrammar extends JSON.grammar {
30
32
 
31
33
  @CoveredBy('Expression')
32
34
  @Node
33
- *NaN() {
35
+ *NotANumber() {
34
36
  yield eat(m`sigilToken: <*Keyword 'NaN' />`);
35
37
  }
38
+
39
+ @CoveredBy('Expression')
40
+ @Node
41
+ *Undefined() {
42
+ yield eat(m`sigilToken: <*Keyword 'undefined' />`);
43
+ }
36
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bablr/language-en-cstml-json",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A BABLR language for CSTML-style JSON",
5
5
  "engines": {
6
6
  "node": ">=12.0.0"
@@ -21,15 +21,15 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/runtime": "^7.22.15",
24
- "@bablr/agast-helpers": "0.6.0",
25
- "@bablr/agast-vm-helpers": "0.6.0",
26
- "@bablr/helpers": "0.21.1",
27
- "@bablr/language-en-json": "0.9.0"
24
+ "@bablr/agast-helpers": "0.7.1",
25
+ "@bablr/agast-vm-helpers": "0.7.1",
26
+ "@bablr/boot": "0.8.1",
27
+ "@bablr/helpers": "0.22.1",
28
+ "@bablr/language-en-json": "0.10.0"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@bablr/macrome": "^0.1.3",
31
32
  "@bablr/macrome-generator-bablr": "^0.3.2",
32
- "@bablr/boot": "^0.7.0",
33
33
  "@bablr/eslint-config-base": "github:bablr-lang/eslint-config-base#49f5952efed27f94ee9b94340eb1563c440bf64e",
34
34
  "enhanced-resolve": "^5.12.0",
35
35
  "eslint": "^8.47.0",