@traqula/rules-sparql-1-1-adjust 0.0.3 → 0.0.5

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/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Traqula Rules SPARQL 1.1 + ADJUST package
2
2
 
3
- **WARNING:** V2 will come shortly and will have lots of breaking changes.
4
-
5
3
  Traqula rules SPARQL 1.1 + ADJUST contains additional rules required for creating a parser for
6
4
  SPARQL 1.1 + ADJUST function from the SPARQL 1.1 rules.
7
5
 
package/lib/grammar.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Expression, SparqlGrammarRule } from '@traqula/rules-sparql-1-1';
2
- import { gram } from '@traqula/rules-sparql-1-1';
3
- export declare const builtInAdjust: gram.RuleDefExpressionFunctionX<"builtInAdjust", [Expression, Expression]>;
4
- export declare const existingBuildInCall: SparqlGrammarRule<'existingBuildInCall', Expression>;
1
+ import type { Expression } from '@traqula/rules-sparql-1-1';
2
+ import { gram as g11 } from '@traqula/rules-sparql-1-1';
3
+ export declare const builtInAdjust: g11.RuleDefExpressionFunctionX<"builtInAdjust", [Expression, Expression]>;
4
+ export declare const builtInPatch: typeof g11.builtInCall;
package/lib/grammar.js CHANGED
@@ -1,8 +1,11 @@
1
- import { funcExpr2, gram } from '@traqula/rules-sparql-1-1';
1
+ import { funcExpr2, gram as g11 } from '@traqula/rules-sparql-1-1';
2
2
  import { BuiltInAdjust } from './lexer';
3
3
  export const builtInAdjust = funcExpr2(BuiltInAdjust);
4
- export const existingBuildInCall = {
5
- name: 'existingBuildInCall',
6
- impl: gram.builtInCall.impl,
4
+ export const builtInPatch = {
5
+ name: g11.builtInCall.name,
6
+ impl: $ => C => $.OR2([
7
+ { ALT: () => $.SUBRULE(builtInAdjust) },
8
+ { ALT: () => g11.builtInCall.impl($)(C) },
9
+ ]),
7
10
  };
8
11
  //# sourceMappingURL=grammar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grammar.js","sourceRoot":"","sources":["grammar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,mBAAmB,GAAiE;IAC/F,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;CAC5B,CAAC","sourcesContent":["import type { Expression, SparqlGrammarRule } from '@traqula/rules-sparql-1-1';\nimport { funcExpr2, gram } from '@traqula/rules-sparql-1-1';\nimport { BuiltInAdjust } from './lexer';\n\nexport const builtInAdjust = funcExpr2(BuiltInAdjust);\n\nexport const existingBuildInCall: SparqlGrammarRule<'existingBuildInCall', Expression> = <const> {\n name: 'existingBuildInCall',\n impl: gram.builtInCall.impl,\n};\n"]}
1
+ {"version":3,"file":"grammar.js","sourceRoot":"","sources":["grammar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,IAAI,IAAI,GAAG,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,IAAI,EAAE,GAAG,CAAC,WAAW,CAAC,IAAI;IAC1B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAa;QAChC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACvC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;KAC1C,CAAC;CACH,CAAC","sourcesContent":["import type { Expression } from '@traqula/rules-sparql-1-1';\nimport { funcExpr2, gram as g11 } from '@traqula/rules-sparql-1-1';\nimport { BuiltInAdjust } from './lexer';\n\nexport const builtInAdjust = funcExpr2(BuiltInAdjust);\n\nexport const builtInPatch: typeof g11.builtInCall = {\n name: g11.builtInCall.name,\n impl: $ => C => $.OR2<Expression>([\n { ALT: () => $.SUBRULE(builtInAdjust) },\n { ALT: () => g11.builtInCall.impl($)(C) },\n ]),\n};\n"]}