occam-verify-cli 1.0.473 → 1.0.475

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 (159) hide show
  1. package/lib/context/file.js +7 -14
  2. package/lib/context/literal.js +4 -5
  3. package/lib/context/scoped.js +3 -9
  4. package/lib/element/assertion/contained.js +3 -3
  5. package/lib/element/assertion/defined.js +6 -46
  6. package/lib/element/assertion/property.js +5 -45
  7. package/lib/element/assertion/satisfies.js +5 -45
  8. package/lib/element/assertion/subproof.js +4 -4
  9. package/lib/element/assertion/type.js +5 -45
  10. package/lib/element/assertion.js +3 -8
  11. package/lib/element/assumption.js +6 -52
  12. package/lib/element/combinator/bracketed.js +3 -3
  13. package/lib/element/combinator.js +5 -10
  14. package/lib/element/conclusion.js +5 -10
  15. package/lib/element/constructor/bracketed.js +5 -45
  16. package/lib/element/constructor.js +5 -10
  17. package/lib/element/declaration/combinator.js +4 -3
  18. package/lib/element/declaration/complexType.js +4 -3
  19. package/lib/element/declaration/constructor.js +4 -3
  20. package/lib/element/declaration/metavariable.js +4 -3
  21. package/lib/element/declaration/simpleType.js +4 -3
  22. package/lib/element/declaration/typePrefix.js +4 -3
  23. package/lib/element/declaration/variable.js +4 -3
  24. package/lib/element/declaration.js +3 -8
  25. package/lib/element/deduction.js +5 -11
  26. package/lib/element/derivation.js +5 -6
  27. package/lib/element/equality.js +6 -52
  28. package/lib/element/equivalence.js +8 -14
  29. package/lib/element/equivalences.js +5 -11
  30. package/lib/element/error.js +5 -10
  31. package/lib/element/frame.js +6 -53
  32. package/lib/element/hypothesis.js +5 -5
  33. package/lib/element/judgement.js +6 -52
  34. package/lib/element/label.js +5 -10
  35. package/lib/element/metaType.js +5 -10
  36. package/lib/element/metavariable.js +8 -54
  37. package/lib/element/parameter.js +5 -10
  38. package/lib/element/procedureCall.js +4 -10
  39. package/lib/element/procedureReference.js +5 -10
  40. package/lib/element/proof.js +5 -10
  41. package/lib/element/proofAssertion/premise.js +4 -3
  42. package/lib/element/proofAssertion/step.js +5 -45
  43. package/lib/element/proofAssertion/supposition.js +4 -3
  44. package/lib/element/proofAssertion.js +3 -8
  45. package/lib/element/property.js +5 -10
  46. package/lib/element/propertyRelation.js +5 -10
  47. package/lib/element/reference.js +6 -52
  48. package/lib/element/rule.js +7 -54
  49. package/lib/element/section.js +5 -10
  50. package/lib/element/signature.js +6 -53
  51. package/lib/element/statement.js +5 -11
  52. package/lib/element/subDerivation.js +5 -6
  53. package/lib/element/subproof.js +6 -52
  54. package/lib/element/substitution/frame.js +4 -3
  55. package/lib/element/substitution/reference.js +4 -3
  56. package/lib/element/substitution/statement.js +5 -45
  57. package/lib/element/substitution/term.js +4 -3
  58. package/lib/element/substitution.js +3 -8
  59. package/lib/element/substitutions.js +5 -11
  60. package/lib/element/term.js +5 -11
  61. package/lib/element/topLevelAssertion/axiom.js +4 -3
  62. package/lib/element/topLevelAssertion/conjecture.js +4 -3
  63. package/lib/element/topLevelAssertion/lemma.js +4 -3
  64. package/lib/element/topLevelAssertion/theorem.js +4 -3
  65. package/lib/element/topLevelAssertion.js +3 -8
  66. package/lib/element/topLevelMetaAssertion/metaLemma.js +4 -3
  67. package/lib/element/topLevelMetaAssertion/metatheorem.js +4 -3
  68. package/lib/element/topLevelMetaAssertion.js +3 -8
  69. package/lib/element/type.js +5 -11
  70. package/lib/element/typePrefix.js +5 -10
  71. package/lib/element/variable.js +6 -52
  72. package/lib/metaTypes.js +5 -10
  73. package/lib/types.js +3 -8
  74. package/lib/utilities/element.js +57 -62
  75. package/lib/utilities/json.js +32 -37
  76. package/lib/utilities/unification.js +6 -11
  77. package/lib/utilities/validation.js +3 -8
  78. package/package.json +2 -2
  79. package/src/context/file.js +2 -4
  80. package/src/context/literal.js +3 -4
  81. package/src/context/scoped.js +1 -3
  82. package/src/element/assertion/contained.js +2 -1
  83. package/src/element/assertion/defined.js +4 -2
  84. package/src/element/assertion/property.js +4 -2
  85. package/src/element/assertion/satisfies.js +3 -2
  86. package/src/element/assertion/subproof.js +3 -2
  87. package/src/element/assertion/type.js +4 -2
  88. package/src/element/assertion.js +1 -1
  89. package/src/element/assumption.js +3 -3
  90. package/src/element/combinator/bracketed.js +1 -1
  91. package/src/element/combinator.js +3 -2
  92. package/src/element/conclusion.js +3 -2
  93. package/src/element/constructor/bracketed.js +3 -2
  94. package/src/element/constructor.js +3 -2
  95. package/src/element/declaration/combinator.js +3 -1
  96. package/src/element/declaration/complexType.js +3 -1
  97. package/src/element/declaration/constructor.js +4 -1
  98. package/src/element/declaration/metavariable.js +3 -1
  99. package/src/element/declaration/simpleType.js +3 -1
  100. package/src/element/declaration/typePrefix.js +3 -1
  101. package/src/element/declaration/variable.js +3 -1
  102. package/src/element/declaration.js +1 -1
  103. package/src/element/deduction.js +3 -3
  104. package/src/element/derivation.js +3 -4
  105. package/src/element/equality.js +3 -3
  106. package/src/element/equivalence.js +3 -4
  107. package/src/element/equivalences.js +3 -4
  108. package/src/element/error.js +2 -2
  109. package/src/element/frame.js +3 -5
  110. package/src/element/hypothesis.js +4 -2
  111. package/src/element/judgement.js +3 -3
  112. package/src/element/label.js +3 -2
  113. package/src/element/metaType.js +2 -2
  114. package/src/element/metavariable.js +3 -3
  115. package/src/element/parameter.js +2 -2
  116. package/src/element/procedureCall.js +3 -3
  117. package/src/element/procedureReference.js +2 -2
  118. package/src/element/proof.js +3 -2
  119. package/src/element/proofAssertion/premise.js +4 -1
  120. package/src/element/proofAssertion/step.js +4 -2
  121. package/src/element/proofAssertion/supposition.js +4 -1
  122. package/src/element/proofAssertion.js +1 -1
  123. package/src/element/property.js +2 -2
  124. package/src/element/propertyRelation.js +2 -2
  125. package/src/element/reference.js +3 -3
  126. package/src/element/rule.js +3 -5
  127. package/src/element/section.js +2 -2
  128. package/src/element/signature.js +3 -5
  129. package/src/element/statement.js +3 -4
  130. package/src/element/subDerivation.js +3 -4
  131. package/src/element/subproof.js +3 -3
  132. package/src/element/substitution/frame.js +4 -1
  133. package/src/element/substitution/reference.js +4 -1
  134. package/src/element/substitution/statement.js +4 -2
  135. package/src/element/substitution/term.js +4 -1
  136. package/src/element/substitution.js +1 -1
  137. package/src/element/substitutions.js +3 -4
  138. package/src/element/term.js +3 -4
  139. package/src/element/topLevelAssertion/axiom.js +3 -1
  140. package/src/element/topLevelAssertion/conjecture.js +3 -1
  141. package/src/element/topLevelAssertion/lemma.js +3 -1
  142. package/src/element/topLevelAssertion/theorem.js +3 -1
  143. package/src/element/topLevelAssertion.js +1 -2
  144. package/src/element/topLevelMetaAssertion/metaLemma.js +3 -1
  145. package/src/element/topLevelMetaAssertion/metatheorem.js +3 -1
  146. package/src/element/topLevelMetaAssertion.js +1 -1
  147. package/src/element/type.js +3 -4
  148. package/src/element/typePrefix.js +2 -2
  149. package/src/element/variable.js +3 -3
  150. package/src/metaTypes.js +1 -1
  151. package/src/types.js +1 -1
  152. package/src/utilities/element.js +1 -1
  153. package/src/utilities/json.js +1 -1
  154. package/src/utilities/unification.js +1 -2
  155. package/src/utilities/validation.js +1 -1
  156. package/lib/element.js +0 -91
  157. package/lib/elements.js +0 -27
  158. package/src/element.js +0 -43
  159. package/src/elements.js +0 -13
@@ -1,14 +1,17 @@
1
1
  "use strict";
2
2
 
3
+ import { elements } from "occam-furtle";
4
+
3
5
  import Substitution from "../substitution";
4
6
 
5
- import { define } from "../../elements";
6
7
  import { literally } from "../../utilities/context";
7
8
  import { stripBracketsFromTerm } from "../../utilities/brackets";
8
9
  import { instantiateTermSubstitution } from "../../process/instantiate";
9
10
  import { termSubstitutionStringFromTermAndVariable } from "../../utilities/string";
10
11
  import { termSubstitutionFromStatementNode, termSubstitutionFromTermSubstitutionNode } from "../../utilities/element";
11
12
 
13
+ const { define } = elements;
14
+
12
15
  export default define(class TermSubstitution extends Substitution {
13
16
  constructor(context, string, node, targetTerm, replacementTerm) {
14
17
  super(context, string, node);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import Element from "../element";
3
+ import { Element } from "occam-furtle";
4
4
 
5
5
  export default class Substitution extends Element {
6
6
  constructor(context, string, node) {
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  import { arrayUtilities } from "necessary";
4
+ import { Element, elements } from "occam-furtle";
4
5
 
5
- import Element from "../element";
6
-
7
- import { define } from "../elements";
8
6
  import { EMPTY_STRING } from "../constants";
9
7
  import { substitutionsStringFromSubstitutions } from "../utilities/string";
10
8
 
11
- const { find, first, clear, prune, filter, extract, compress, correlate } = arrayUtilities;
9
+ const { define } = elements,
10
+ { find, first, clear, prune, filter, extract, compress, correlate } = arrayUtilities;
12
11
 
13
12
  export default define(class Substitutions extends Element {
14
13
  constructor(context, string, node, array, savedArray) {
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  import { arrayUtilities } from "necessary";
4
+ import { Element, elements } from "occam-furtle";
4
5
 
5
- import Element from "../element";
6
-
7
- import { define } from "../elements";
8
6
  import { validateTerms } from "../utilities/validation";
9
7
  import { typeToTypeJSON } from "../utilities/json";
10
8
 
11
- const { filter, compress } = arrayUtilities;
9
+ const { define } = elements,
10
+ { filter, compress } = arrayUtilities;
12
11
 
13
12
  export default define(class Term extends Element {
14
13
  constructor(context, string, node, type) {
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
 
3
+ import { elements } from "occam-furtle";
4
+
3
5
  import TopLevelAssertion from "../../node/topLevelAssertion";
4
6
 
5
- import { define } from "../../elements";
7
+ const { define } = elements;
6
8
 
7
9
  export default define(class Axiom extends TopLevelAssertion {
8
10
  isSatisfiable() {
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
 
3
+ import { elements } from "occam-furtle";
4
+
3
5
  import TopLevelAssertion from "../topLevelAssertion";
4
6
 
5
- import { define } from "../../elements";
7
+ const { define } = elements;
6
8
 
7
9
  export default define(class Conjecture extends TopLevelAssertion {
8
10
  verify() {
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
 
3
+ import { elements } from "occam-furtle";
4
+
3
5
  import TopLevelAssertion from "../topLevelAssertion";
4
6
 
5
- import { define } from "../../elements";
7
+ const { define } = elements;
6
8
 
7
9
  export default define(class Lemma extends TopLevelAssertion {
8
10
  verify() {
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
 
3
+ import { elements } from "occam-furtle";
4
+
3
5
  import TopLevelAssertion from "../topLevelAssertion";
4
6
 
5
- import { define } from "../../elements";
7
+ const { define } = elements;
6
8
 
7
9
  export default define(class Theorem extends TopLevelAssertion {
8
10
  verify() {
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
 
3
+ import { Element } from "occam-furtle";
3
4
  import { arrayUtilities } from "necessary";
4
5
 
5
- import Element from "../element";
6
-
7
6
  import { scope, attempt } from "../utilities/context";
8
7
  import { labelsFromJSON,
9
8
  deductionFromJSON,
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
 
3
+ import { elements } from "occam-furtle";
4
+
3
5
  import TopLevelMetaAssertion from "./../topLevelMetaAssertion";
4
6
 
5
- import { define } from "../../elements";
7
+ const { define } = elements;
6
8
 
7
9
  export default define(class MetaLemma extends TopLevelMetaAssertion {
8
10
  verify() {
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
 
3
+ import { elements } from "occam-furtle";
4
+
3
5
  import TopLevelMetaAssertion from "../topLevelMetaAssertion";
4
6
 
5
- import { define } from "../../elements";
7
+ const { define } = elements;
6
8
 
7
9
  export default define(class Metatheorem extends TopLevelMetaAssertion {
8
10
  verify() {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import Element from "../element";
3
+ import { Element } from "occam-furtle";
4
4
 
5
5
  import { scope } from "../utilities/context";
6
6
  import { labelFromJSON,
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  import { arrayUtilities } from "necessary";
4
+ import { Element, elements } from "occam-furtle";
4
5
 
5
- import Element from "../element";
6
-
7
- import { define } from "../elements";
8
6
  import { baseTypeFromNothing } from "../types";
9
7
  import { typeStringFromTypeNameTypePrefixNameAndSuperTypes } from "../utilities/string";
10
8
  import { superTypesFromJSON, propertiesFromJSON, superTypesToSuperTypesJSON, propertiesToPropertiesJSON } from "../utilities/json";
11
9
 
12
- const { push, first } = arrayUtilities;
10
+ const { define } = elements,
11
+ { push, first } = arrayUtilities;
13
12
 
14
13
  export default define(class Type extends Element {
15
14
  constructor(context, string, node, name, prefixName, superTypes, properties, provisional) {
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
- import Element from "../element";
3
+ import { Element, elements } from "occam-furtle";
4
4
 
5
- import { define } from "../elements";
5
+ const { define } = elements;
6
6
 
7
7
  export default define(class TypePrefix extends Element {
8
8
  constructor(context, string, node, name) {
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
 
3
- import Element from "../element";
4
- import elements from "../elements";
3
+ import { Element, elements } from "occam-furtle";
5
4
 
6
- import { define } from "../elements";
7
5
  import { synthetically } from "../utilities/context";
8
6
  import { typeToTypeJSON } from "../utilities/json";
9
7
 
8
+ const { define } = elements;
9
+
10
10
  export default define(class Variable extends Element {
11
11
  constructor(context, string, node, type, identifier, propertyRelations) {
12
12
  super(context, string, node);
package/src/metaTypes.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import elements from "./elements";
3
+ import { elements } from "occam-furtle";
4
4
 
5
5
  import { FRAME_META_TYPE_NAME, REFERENCE_META_TYPE_NAME, STATEMENT_META_TYPE_NAME } from "./metaTypeNames";
6
6
 
package/src/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import elements from "./elements";
3
+ import { elements } from "occam-furtle";
4
4
 
5
5
  import { BASE_TYPE_SYMBOL } from "./constants";
6
6
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import elements from "../elements";
3
+ import { elements } from "occam-furtle";
4
4
 
5
5
  import { literally } from "../utilities/context";
6
6
  import { baseTypeFromNothing } from "../types";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import elements from "../elements";
3
+ import { elements } from "occam-furtle";
4
4
 
5
5
  import { findMetaTypeByMetaTypeName } from "../metaTypes";
6
6
 
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
 
3
+ import { elements } from "occam-furtle";
3
4
  import { arrayUtilities } from "necessary";
4
5
 
5
- import elements from "../elements";
6
-
7
6
  import { synthetically } from "../utilities/context";
8
7
  import { equalityFromStatement,
9
8
  judgementFromStatement,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import elements from "../elements";
3
+ import { elements } from "occam-furtle";
4
4
 
5
5
  import { bracketedConstructorFromNothing, bracketedCombinatorFromNothing } from "../utilities/instance";
6
6
  import { equalityFromStatement,
package/lib/element.js DELETED
@@ -1,91 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return Element;
9
- }
10
- });
11
- function _class_call_check(instance, Constructor) {
12
- if (!(instance instanceof Constructor)) {
13
- throw new TypeError("Cannot call a class as a function");
14
- }
15
- }
16
- function _defineProperties(target, props) {
17
- for(var i = 0; i < props.length; i++){
18
- var descriptor = props[i];
19
- descriptor.enumerable = descriptor.enumerable || false;
20
- descriptor.configurable = true;
21
- if ("value" in descriptor) descriptor.writable = true;
22
- Object.defineProperty(target, descriptor.key, descriptor);
23
- }
24
- }
25
- function _create_class(Constructor, protoProps, staticProps) {
26
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
- if (staticProps) _defineProperties(Constructor, staticProps);
28
- return Constructor;
29
- }
30
- var Element = /*#__PURE__*/ function() {
31
- function Element(context, string, node) {
32
- _class_call_check(this, Element);
33
- this.context = context;
34
- this.string = string;
35
- this.node = node;
36
- }
37
- _create_class(Element, [
38
- {
39
- key: "getContext",
40
- value: function getContext() {
41
- return this.context;
42
- }
43
- },
44
- {
45
- key: "getString",
46
- value: function getString() {
47
- return this.string;
48
- }
49
- },
50
- {
51
- key: "getNode",
52
- value: function getNode() {
53
- return this.node;
54
- }
55
- },
56
- {
57
- key: "setContext",
58
- value: function setContext(context) {
59
- this.context = context;
60
- }
61
- },
62
- {
63
- key: "setString",
64
- value: function setString(string) {
65
- this.string = string;
66
- }
67
- },
68
- {
69
- key: "setNode",
70
- value: function setNode(node) {
71
- this.node = node;
72
- }
73
- },
74
- {
75
- key: "matchNode",
76
- value: function matchNode(node) {
77
- return this.node.match(node);
78
- }
79
- },
80
- {
81
- key: "isEqualTo",
82
- value: function isEqualTo(element) {
83
- var elementNode = element.getNode(), matches = this.node.match(elementNode), equalTo = matches; ///
84
- return equalTo;
85
- }
86
- }
87
- ]);
88
- return Element;
89
- }();
90
-
91
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9lbGVtZW50LmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBFbGVtZW50IHtcbiAgY29uc3RydWN0b3IoY29udGV4dCwgc3RyaW5nLCBub2RlKSB7XG4gICAgdGhpcy5jb250ZXh0ID0gY29udGV4dDtcbiAgICB0aGlzLnN0cmluZyA9IHN0cmluZztcbiAgICB0aGlzLm5vZGUgPSBub2RlO1xuICB9XG5cbiAgZ2V0Q29udGV4dCgpIHtcbiAgICByZXR1cm4gdGhpcy5jb250ZXh0O1xuICB9XG5cbiAgZ2V0U3RyaW5nKCkge1xuICAgIHJldHVybiB0aGlzLnN0cmluZztcbiAgfVxuXG4gIGdldE5vZGUoKSB7XG4gICAgcmV0dXJuIHRoaXMubm9kZTtcbiAgfVxuXG4gIHNldENvbnRleHQoY29udGV4dCkge1xuICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7XG4gIH1cblxuICBzZXRTdHJpbmcoc3RyaW5nKSB7XG4gICAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG4gIH1cblxuICBzZXROb2RlKG5vZGUpIHtcbiAgICB0aGlzLm5vZGUgPSBub2RlO1xuICB9XG5cbiAgbWF0Y2hOb2RlKG5vZGUpIHsgcmV0dXJuIHRoaXMubm9kZS5tYXRjaChub2RlKTsgfVxuXG4gIGlzRXF1YWxUbyhlbGVtZW50KSB7XG4gICAgY29uc3QgZWxlbWVudE5vZGUgPSBlbGVtZW50LmdldE5vZGUoKSxcbiAgICAgICAgICBtYXRjaGVzID0gdGhpcy5ub2RlLm1hdGNoKGVsZW1lbnROb2RlKSxcbiAgICAgICAgICBlcXVhbFRvID0gbWF0Y2hlczsgIC8vL1xuXG4gICAgcmV0dXJuIGVxdWFsVG87XG4gIH1cbn1cbiJdLCJuYW1lcyI6WyJFbGVtZW50IiwiY29udGV4dCIsInN0cmluZyIsIm5vZGUiLCJnZXRDb250ZXh0IiwiZ2V0U3RyaW5nIiwiZ2V0Tm9kZSIsInNldENvbnRleHQiLCJzZXRTdHJpbmciLCJzZXROb2RlIiwibWF0Y2hOb2RlIiwibWF0Y2giLCJpc0VxdWFsVG8iLCJlbGVtZW50IiwiZWxlbWVudE5vZGUiLCJtYXRjaGVzIiwiZXF1YWxUbyJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7ZUFFcUJBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQU4sSUFBQSxBQUFNQSx3QkFBTjthQUFNQSxRQUNQQyxPQUFPLEVBQUVDLE1BQU0sRUFBRUMsSUFBSTtnQ0FEZEg7UUFFakIsSUFBSSxDQUFDQyxPQUFPLEdBQUdBO1FBQ2YsSUFBSSxDQUFDQyxNQUFNLEdBQUdBO1FBQ2QsSUFBSSxDQUFDQyxJQUFJLEdBQUdBOztrQkFKS0g7O1lBT25CSSxLQUFBQTttQkFBQUEsU0FBQUE7Z0JBQ0UsT0FBTyxJQUFJLENBQUNILE9BQU87WUFDckI7OztZQUVBSSxLQUFBQTttQkFBQUEsU0FBQUE7Z0JBQ0UsT0FBTyxJQUFJLENBQUNILE1BQU07WUFDcEI7OztZQUVBSSxLQUFBQTttQkFBQUEsU0FBQUE7Z0JBQ0UsT0FBTyxJQUFJLENBQUNILElBQUk7WUFDbEI7OztZQUVBSSxLQUFBQTttQkFBQUEsU0FBQUEsV0FBV04sT0FBTztnQkFDaEIsSUFBSSxDQUFDQSxPQUFPLEdBQUdBO1lBQ2pCOzs7WUFFQU8sS0FBQUE7bUJBQUFBLFNBQUFBLFVBQVVOLE1BQU07Z0JBQ2QsSUFBSSxDQUFDQSxNQUFNLEdBQUdBO1lBQ2hCOzs7WUFFQU8sS0FBQUE7bUJBQUFBLFNBQUFBLFFBQVFOLElBQUk7Z0JBQ1YsSUFBSSxDQUFDQSxJQUFJLEdBQUdBO1lBQ2Q7OztZQUVBTyxLQUFBQTttQkFBQUEsU0FBQUEsVUFBVVAsSUFBSTtnQkFBSSxPQUFPLElBQUksQ0FBQ0EsSUFBSSxDQUFDUSxLQUFLLENBQUNSO1lBQU87OztZQUVoRFMsS0FBQUE7bUJBQUFBLFNBQUFBLFVBQVVDLE9BQU87Z0JBQ2YsSUFBTUMsY0FBY0QsUUFBUVAsT0FBTyxJQUM3QlMsVUFBVSxJQUFJLENBQUNaLElBQUksQ0FBQ1EsS0FBSyxDQUFDRyxjQUMxQkUsVUFBVUQsU0FBVSxHQUFHO2dCQUU3QixPQUFPQztZQUNUOzs7V0F2Q21CaEIifQ==
package/lib/elements.js DELETED
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: Object.getOwnPropertyDescriptor(all, name).get
9
- });
10
- }
11
- _export(exports, {
12
- get default () {
13
- return _default;
14
- },
15
- get define () {
16
- return define;
17
- }
18
- });
19
- var elements = {};
20
- function define(Element) {
21
- var name = Element.name;
22
- elements[name] = Element;
23
- return Element;
24
- }
25
- var _default = elements;
26
-
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9lbGVtZW50cy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuY29uc3QgZWxlbWVudHMgPSB7fTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRlZmluZShFbGVtZW50KSB7XG4gIGNvbnN0IHsgbmFtZSB9ID0gRWxlbWVudDtcblxuICBlbGVtZW50c1tuYW1lXSA9IEVsZW1lbnQ7XG5cbiAgcmV0dXJuIEVsZW1lbnQ7XG59XG5cbmV4cG9ydCBkZWZhdWx0IGVsZW1lbnRzO1xuIl0sIm5hbWVzIjpbImRlZmluZSIsImVsZW1lbnRzIiwiRWxlbWVudCIsIm5hbWUiXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7OztRQVlBO2VBQUE7O1FBUmdCQTtlQUFBQTs7O0FBRmhCLElBQU1DLFdBQVcsQ0FBQztBQUVYLFNBQVNELE9BQU9FLE9BQU87SUFDNUIsSUFBTSxBQUFFQyxPQUFTRCxRQUFUQztJQUVSRixRQUFRLENBQUNFLEtBQUssR0FBR0Q7SUFFakIsT0FBT0E7QUFDVDtJQUVBLFdBQWVEIn0=
package/src/element.js DELETED
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- export default class Element {
4
- constructor(context, string, node) {
5
- this.context = context;
6
- this.string = string;
7
- this.node = node;
8
- }
9
-
10
- getContext() {
11
- return this.context;
12
- }
13
-
14
- getString() {
15
- return this.string;
16
- }
17
-
18
- getNode() {
19
- return this.node;
20
- }
21
-
22
- setContext(context) {
23
- this.context = context;
24
- }
25
-
26
- setString(string) {
27
- this.string = string;
28
- }
29
-
30
- setNode(node) {
31
- this.node = node;
32
- }
33
-
34
- matchNode(node) { return this.node.match(node); }
35
-
36
- isEqualTo(element) {
37
- const elementNode = element.getNode(),
38
- matches = this.node.match(elementNode),
39
- equalTo = matches; ///
40
-
41
- return equalTo;
42
- }
43
- }
package/src/elements.js DELETED
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- const elements = {};
4
-
5
- export function define(Element) {
6
- const { name } = Element;
7
-
8
- elements[name] = Element;
9
-
10
- return Element;
11
- }
12
-
13
- export default elements;