@bablr/helpers 0.1.5 → 0.1.6

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/decorators.js CHANGED
@@ -1 +1,8 @@
1
1
  export * from '@bablr/boot-helpers/decorators';
2
+
3
+ export const UnboundAttributes = (attributes) => (desc, context) => {
4
+ context.addInitializer(function () {
5
+ this.unboundAttributes = this.unboundAttributes || new Map();
6
+ this.unboundAttributes.set(context.name, attributes);
7
+ });
8
+ };
@@ -106,6 +106,7 @@ export function* Punctuator(obj, s, ctx) {
106
106
  attrs
107
107
  };
108
108
  }
109
+ export const Keyword = Punctuator;
109
110
  export function* Optional(matchers, s, ctx) {
110
111
  const matchers_ = ctx.unbox(matchers);
111
112
  if (matchers_.length > 1) {
@@ -47,6 +47,8 @@ export function* Punctuator(obj, s, ctx) {
47
47
  return { attrs };
48
48
  }
49
49
 
50
+ export const Keyword = Punctuator;
51
+
50
52
  export function* Optional(matchers, s, ctx) {
51
53
  const matchers_ = ctx.unbox(matchers);
52
54
  if (matchers_.length > 1) {
package/lib/symbols.js CHANGED
@@ -1,6 +1 @@
1
1
  export const node = Symbol.for('@bablr/node');
2
-
3
- export const active = Symbol.for('@bablr/active');
4
- export const suspended = Symbol.for('@bablr/suspended');
5
- export const accepted = Symbol.for('@bablr/accepted');
6
- export const rejected = Symbol.for('@bablr/rejected');
package/lib/trivia.js CHANGED
@@ -75,6 +75,8 @@ export const triviaEnhancer = ({ triviaIsAllowed, eatMatchTrivia }, grammar) =>
75
75
  matchedResults.add(s.result);
76
76
  }
77
77
  }
78
+
79
+ return co.value;
78
80
  } catch (e) {
79
81
  co.throw(e);
80
82
  throw e;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bablr/helpers",
3
3
  "description": "Command helpers for use in writing BABLR grammars",
4
- "version": "0.1.5",
4
+ "version": "0.1.6",
5
5
  "author": "Conrad Buck<conartist6@gmail.com>",
6
6
  "type": "module",
7
7
  "files": [