occam-verify-cli 1.0.414 → 1.0.416

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.
@@ -2,6 +2,8 @@
2
2
 
3
3
  import { nodeQuery } from "../utilities/query";
4
4
  import { isLastRemainingArgumentFunction } from "../utilities/pass";
5
+ import statement from "../ontology/statement";
6
+ import ontology from "../ontology";
5
7
 
6
8
  const nonTerminalNodeQuery = nodeQuery("/*");
7
9
 
@@ -9,6 +11,23 @@ const termNodeQuery = nodeQuery("/term"),
9
11
  typeNodeQuery = nodeQuery("/type"),
10
12
  statementNodeQuery = nodeQuery("/statement");
11
13
 
14
+ const errorNodeQuery = nodeQuery("/error"),
15
+ ruleNodeQuery = nodeQuery("/rule"),
16
+ axiomNodeQuery = nodeQuery("/axiom"),
17
+ lemmaNodeQuery = nodeQuery("/lemma"),
18
+ sectionNodeQuery = nodeQuery("/section"),
19
+ theoremNodeQuery = nodeQuery("/theorem"),
20
+ metaLemmaNodeQuery = nodeQuery("/metaLemma"),
21
+ conjectureNodeQuery = nodeQuery("/conjecture"),
22
+ metatheoremNodeQuery = nodeQuery("/metatheorem"),
23
+ variableDeclarationNodeQuery = nodeQuery("/variableDeclaration"),
24
+ combinatorDeclarationNodeQuery = nodeQuery("/combinatorDeclaration"),
25
+ simpleTypeDeclarationNodeQuery = nodeQuery("/simpleTypeDeclaration"),
26
+ typePrefixDeclarationNodeQuery = nodeQuery("/typePrefixDeclaration"),
27
+ constructorDeclarationNodeQuery = nodeQuery("/constructorDeclaration"),
28
+ complexTypeDeclarationNodeQuery = nodeQuery("/complexTypeDeclaration"),
29
+ metavariableDeclarationNodeQuery = nodeQuery("/metavariableDeclaration");
30
+
12
31
  export default class Pass {
13
32
  run(node, ...remainingArguments) {
14
33
  let success;
@@ -156,49 +175,410 @@ export default class Pass {
156
175
  }
157
176
  }
158
177
 
178
+ class TopLevelPass extends Pass {
179
+ static maps = [
180
+ {
181
+ nodeQuery: errorNodeQuery,
182
+ run: (errorNode, context) => {
183
+ let success = false;
184
+
185
+ const { Error } = ontology,
186
+ error = Error.fromErrorNode(errorNode, context),
187
+ errorVerifies = error.verify();
188
+
189
+ if (errorVerifies) {
190
+ success = true;
191
+ }
192
+
193
+ return success;
194
+ }
195
+ },
196
+ {
197
+ nodeQuery: ruleNodeQuery,
198
+ run: (ruleNode, context) => {
199
+ let success = false;
200
+
201
+ const { Rule } = ontology,
202
+ rule = Rule.fromRuleNode(ruleNode, context),
203
+ ruleVerifies = rule.verify();
204
+
205
+ if (ruleVerifies) {
206
+ success = true;
207
+ }
208
+
209
+ return success;
210
+ }
211
+ },
212
+ {
213
+ nodeQuery: axiomNodeQuery,
214
+ run: (axiomNode, context) => {
215
+ let success = false;
216
+
217
+ const { Axiom } = ontology,
218
+ axiom = Axiom.fromAxiomNode(axiomNode, context),
219
+ axiomVerifies = axiom.verify();
220
+
221
+ if (axiomVerifies) {
222
+ success = true;
223
+ }
224
+
225
+ return success;
226
+ }
227
+ },
228
+ {
229
+ nodeQuery: lemmaNodeQuery,
230
+ run: (lemmaNode, context) => {
231
+ let success = false;
232
+
233
+ const { Lemma } = ontology,
234
+ lemma = Lemma.fromLemmaNode(lemmaNode, context),
235
+ lemmaVerifies = lemma.verify();
236
+
237
+ if (lemmaVerifies) {
238
+ success = true;
239
+ }
240
+
241
+ return success;
242
+ }
243
+ },
244
+ {
245
+ nodeQuery: sectionNodeQuery,
246
+ run: (sectionNode, context) => {
247
+ let success = false;
248
+
249
+ const { Section } = ontology,
250
+ section = Section.fromSectionNode(sectionNode, context),
251
+ sectionVerifies = section.verify();
252
+
253
+ if (sectionVerifies) {
254
+ success = true;
255
+ }
256
+
257
+ return success;
258
+ }
259
+ },
260
+ {
261
+ nodeQuery: theoremNodeQuery,
262
+ run: (theoremNode, context) => {
263
+ let success = false;
264
+
265
+ const { Theorem } = ontology,
266
+ theorem = Theorem.fromTheoremNode(theoremNode, context),
267
+ theoremVerifies = theorem.verify();
268
+
269
+ if (theoremVerifies) {
270
+ success = true;
271
+ }
272
+
273
+ return success;
274
+ }
275
+ },
276
+ {
277
+ nodeQuery: metaLemmaNodeQuery,
278
+ run: (metaLemmaNode, context) => {
279
+ let success = false;
280
+
281
+ const { MetaLemma } = ontology,
282
+ metaLemma = MetaLemma.fromMetaLemmaNode(metaLemmaNode, context),
283
+ metaLemmaVerifies = metaLemma.verify();
284
+
285
+ if (metaLemmaVerifies) {
286
+ success = true;
287
+ }
288
+
289
+ return success;
290
+ }
291
+ },
292
+ {
293
+ nodeQuery: conjectureNodeQuery,
294
+ run: (conjectureNode, context) => {
295
+ let success = false;
296
+
297
+ const { Conjecture } = ontology,
298
+ conjecture = Conjecture.fromConjectureNode(conjectureNode, context),
299
+ conjectureVerifies = conjecture.verify();
300
+
301
+ if (conjectureVerifies) {
302
+ success = true;
303
+ }
304
+
305
+ return success;
306
+ }
307
+ },
308
+ {
309
+ nodeQuery: metatheoremNodeQuery,
310
+ run: (metatheoremNode, context) => {
311
+ let success = false;
312
+
313
+ const { Metatheorem } = ontology,
314
+ metatheorem = Metatheorem.fromMetatheoremNode(metatheoremNode, context),
315
+ metatheoremVerifies = metatheorem.verify();
316
+
317
+ if (metatheoremVerifies) {
318
+ success = true;
319
+ }
320
+
321
+ return success;
322
+ }
323
+ },
324
+ {
325
+ nodeQuery: variableDeclarationNodeQuery,
326
+ run: (variableDeclarationNode, context) => {
327
+ let success = false;
328
+
329
+ const { VariableDeclaration } = ontology,
330
+ variableDeclaration = VariableDeclaration.fromVariableDeclarationNode(variableDeclarationNode, context),
331
+ variableDeclarationVerifies = variableDeclaration.verify();
332
+
333
+ if (variableDeclarationVerifies) {
334
+ success = true;
335
+ }
336
+
337
+ return success;
338
+ }
339
+ },
340
+ {
341
+ nodeQuery: simpleTypeDeclarationNodeQuery,
342
+ run: (simpleTypeDeclarationNode, context) => {
343
+ let success = false;
344
+
345
+ const { SimpleTypeDeclaration } = ontology,
346
+ simpleTypeDeclaration = SimpleTypeDeclaration.fromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
347
+ simpleTypeDeclarationVerifies = simpleTypeDeclaration.verify();
348
+
349
+ if (simpleTypeDeclarationVerifies) {
350
+ success = true;
351
+ }
352
+
353
+ return success;
354
+ }
355
+ },
356
+ {
357
+ nodeQuery: typePrefixDeclarationNodeQuery,
358
+ run: (typePrefixDeclarationNode, context) => {
359
+ let success = false;
360
+
361
+ const { TypePrefixDeclaration } = ontology,
362
+ typePrefixDeclaration = TypePrefixDeclaration.fromTypePrefixDeclarationNode(typePrefixDeclarationNode, context),
363
+ typePrefixDeclarationVerifies = typePrefixDeclaration.verify();
364
+
365
+ if (typePrefixDeclarationVerifies) {
366
+ success = true;
367
+ }
368
+
369
+ return success;
370
+ }
371
+ },
372
+ {
373
+ nodeQuery: combinatorDeclarationNodeQuery,
374
+ run: (combinatorDeclarationNode, context) => {
375
+ let success = false;
376
+
377
+ const { CombinatorDeclaration } = ontology,
378
+ combinatorDeclaration = CombinatorDeclaration.fromCombinatorDeclarationNode(combinatorDeclarationNode, context),
379
+ combinatorDeclarationVerifies = combinatorDeclaration.verify();
380
+
381
+ if (combinatorDeclarationVerifies) {
382
+ success = true;
383
+ }
384
+
385
+ return success;
386
+ }
387
+ },
388
+ {
389
+ nodeQuery: constructorDeclarationNodeQuery,
390
+ run: (constructorDeclarationNode, context) => {
391
+ let success = false;
392
+
393
+ const { ConstructorDeclaration } = ontology,
394
+ constructorDeclaration = ConstructorDeclaration.fromConstructorDeclarationNode(constructorDeclarationNode, context),
395
+ constructorDeclarationVerifies = constructorDeclaration.verify();
396
+
397
+ if (constructorDeclarationVerifies) {
398
+ success = true;
399
+ }
400
+
401
+ return success;
402
+ }
403
+ },
404
+ {
405
+ nodeQuery: complexTypeDeclarationNodeQuery,
406
+ run: (complexTypeDeclarationNode, context) => {
407
+ let success = false;
408
+
409
+ const { ComplexTypeDeclaration } = ontology,
410
+ complexTypeDeclaration = ComplexTypeDeclaration.fromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
411
+ complexTypeDeclarationVerifies = complexTypeDeclaration.verify();
412
+
413
+ if (complexTypeDeclarationVerifies) {
414
+ success = true;
415
+ }
416
+
417
+ return success;
418
+ }
419
+ },
420
+ {
421
+ nodeQuery: metavariableDeclarationNodeQuery,
422
+ run: (metavariableDeclarationNode, context) => {
423
+ let success = false;
424
+
425
+ const { MetavariableDeclaration } = ontology,
426
+ metavariableDeclaration = MetavariableDeclaration.fromMetavariableDeclarationNode(metavariableDeclarationNode, context),
427
+ metavariableDeclarationVerifies = metavariableDeclaration.verify();
428
+
429
+ if (metavariableDeclarationVerifies) {
430
+ success = true;
431
+ }
432
+
433
+ return success;
434
+ }
435
+ }
436
+ ];
437
+ }
438
+
159
439
  class CombinatorPass extends Pass {
160
440
  static maps = [
161
441
  {
162
442
  nodeQuery: statementNodeQuery,
163
443
  run: (statementNode, context) => {
444
+ let success = false;
445
+
164
446
  const { Statement } = ontology,
165
447
  statement = Statement.fromStatementNode(statementNode, context),
166
448
  assignments = null,
167
449
  stated = false,
168
450
  statementVerifies = statement.verify(assignments, stated, context);
169
451
 
170
- return statementVerifies;
452
+ if (statementVerifies) {
453
+ success = true;
454
+ }
455
+
456
+ return success;
457
+ }
458
+ },
459
+ {
460
+ nodeQuery: termNodeQuery,
461
+ run: (termNode, context) => {
462
+ let success = false;
463
+
464
+ const { Term } = ontology,
465
+ term = Term.fromTermNode(termNode, context),
466
+ termVerifies = term.verify(context, () => {
467
+ const verifiesAhead = true;
468
+
469
+ return verifiesAhead;
470
+ });
471
+
472
+ if (termVerifies) {
473
+ success = true;
474
+ }
475
+
476
+ return success;
171
477
  }
172
478
  },
479
+ {
480
+ nodeQuery: typeNodeQuery,
481
+ run: (typeNode, context) => {
482
+ let success = false;
483
+
484
+ const nominalTypeName = typeNode.getNominalTypeName(),
485
+ typePresent = context.isTypePresentByNominalTypeName(nominalTypeName);
486
+
487
+ if (typePresent) {
488
+ success = true;
489
+ }
490
+
491
+ return success;
492
+ }
493
+ }
494
+ ];
495
+ }
496
+
497
+ class ConstructorPass extends Pass {
498
+ static maps = [
173
499
  {
174
500
  nodeQuery: termNodeQuery,
175
- verify: (termNode, context) => {
501
+ run: (termNode, context, verifyAhead) => {
502
+ let success = false;
503
+
176
504
  const { Term } = ontology,
177
- term = Term.fromTermNode(termNode, context),
178
- termVerifies = term.verify(context, () => {
179
- const verifiesAhead = true;
505
+ term = Term.fromTermNode(termNode, context),
506
+ termVerifies = term.verify(context, verifyAhead);
180
507
 
181
- return verifiesAhead;
182
- });
508
+ if (termVerifies) {
509
+ success = true;
510
+ }
183
511
 
184
- return termVerifies;
512
+ return success;
185
513
  }
186
514
  },
187
515
  {
188
516
  nodeQuery: typeNodeQuery,
189
- verify: (typeNode, context) => {
190
- let typeVerifies = false;
517
+ run: (typeNode, context, verifyAhead) => {
518
+ let success = false;
191
519
 
192
520
  const nominalTypeName = typeNode.getNominalTypeName(),
193
- typePresent = context.isTypePresentByNominalTypeName(nominalTypeName);
521
+ typePresent = context.isTypePresentByNominalTypeName(nominalTypeName);
194
522
 
195
523
  if (typePresent) {
196
- typeVerifies = true;
524
+ const verifiesAhead = verifyAhead();
525
+
526
+ if (verifiesAhead) {
527
+ success = true;
528
+ }
529
+ } else {
530
+ const typeString = nominalTypeName; ///
531
+
532
+ context.debug(`The '${typeString}' type is not present.`);
533
+
534
+ success = false;
197
535
  }
198
536
 
199
- return typeVerifies;
537
+ return success;
200
538
  }
201
539
  }
202
540
  ];
203
541
  }
204
542
 
543
+ const topLevelPass = new TopLevelPass(),
544
+ combinatorPass = new CombinatorPass(),
545
+ constructorPass = new ConstructorPass();
546
+
547
+ export function verifyFile(fileNode, context) {
548
+ let fileVerifies = false;
549
+
550
+ const node = fileNode, ///
551
+ sucess = topLevelPass.run(node, context);
552
+
553
+ if (sucess) {
554
+ fileVerifies = true;
555
+ }
556
+
557
+ return fileVerifies;
558
+ }
559
+
560
+ export function verifyTerm(termNode, context) {
561
+ let termVerifies = false;
562
+
563
+ const node = termNode, ///
564
+ sucess = constructorPass.run(node, context);
565
+
566
+ if (sucess) {
567
+ termVerifies = true;
568
+ }
569
+
570
+ return termVerifies;
571
+ }
572
+
573
+ export function verifyStatement(statementNode, context) {
574
+ let statementVerifies = false;
575
+
576
+ const node = statementNode, ///
577
+ sucess = combinatorPass.run(node, context);
578
+
579
+ if (sucess) {
580
+ statementVerifies = true;
581
+ }
582
+
583
+ return statementVerifies;
584
+ }
@@ -1,230 +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 _default;
9
- }
10
- });
11
- var _necessary = require("necessary");
12
- var _ontology = /*#__PURE__*/ _interop_require_default(require("../ontology"));
13
- var _verifier = /*#__PURE__*/ _interop_require_default(require("../verifier"));
14
- var _query = require("../utilities/query");
15
- var _constants = require("../constants");
16
- function _array_like_to_array(arr, len) {
17
- if (len == null || len > arr.length) len = arr.length;
18
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
19
- return arr2;
20
- }
21
- function _array_without_holes(arr) {
22
- if (Array.isArray(arr)) return _array_like_to_array(arr);
23
- }
24
- function _assert_this_initialized(self) {
25
- if (self === void 0) {
26
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
27
- }
28
- return self;
29
- }
30
- function _call_super(_this, derived, args) {
31
- derived = _get_prototype_of(derived);
32
- return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
33
- }
34
- function _class_call_check(instance, Constructor) {
35
- if (!(instance instanceof Constructor)) {
36
- throw new TypeError("Cannot call a class as a function");
37
- }
38
- }
39
- function _defineProperties(target, props) {
40
- for(var i = 0; i < props.length; i++){
41
- var descriptor = props[i];
42
- descriptor.enumerable = descriptor.enumerable || false;
43
- descriptor.configurable = true;
44
- if ("value" in descriptor) descriptor.writable = true;
45
- Object.defineProperty(target, descriptor.key, descriptor);
46
- }
47
- }
48
- function _create_class(Constructor, protoProps, staticProps) {
49
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
50
- if (staticProps) _defineProperties(Constructor, staticProps);
51
- return Constructor;
52
- }
53
- function _define_property(obj, key, value) {
54
- if (key in obj) {
55
- Object.defineProperty(obj, key, {
56
- value: value,
57
- enumerable: true,
58
- configurable: true,
59
- writable: true
60
- });
61
- } else {
62
- obj[key] = value;
63
- }
64
- return obj;
65
- }
66
- function _get(target, property, receiver) {
67
- if (typeof Reflect !== "undefined" && Reflect.get) {
68
- _get = Reflect.get;
69
- } else {
70
- _get = function get(target, property, receiver) {
71
- var base = _super_prop_base(target, property);
72
- if (!base) return;
73
- var desc = Object.getOwnPropertyDescriptor(base, property);
74
- if (desc.get) {
75
- return desc.get.call(receiver || target);
76
- }
77
- return desc.value;
78
- };
79
- }
80
- return _get(target, property, receiver || target);
81
- }
82
- function _get_prototype_of(o) {
83
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
84
- return o.__proto__ || Object.getPrototypeOf(o);
85
- };
86
- return _get_prototype_of(o);
87
- }
88
- function _inherits(subClass, superClass) {
89
- if (typeof superClass !== "function" && superClass !== null) {
90
- throw new TypeError("Super expression must either be null or a function");
91
- }
92
- subClass.prototype = Object.create(superClass && superClass.prototype, {
93
- constructor: {
94
- value: subClass,
95
- writable: true,
96
- configurable: true
97
- }
98
- });
99
- if (superClass) _set_prototype_of(subClass, superClass);
100
- }
101
- function _interop_require_default(obj) {
102
- return obj && obj.__esModule ? obj : {
103
- default: obj
104
- };
105
- }
106
- function _iterable_to_array(iter) {
107
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
108
- }
109
- function _non_iterable_spread() {
110
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
111
- }
112
- function _possible_constructor_return(self, call) {
113
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
114
- return call;
115
- }
116
- return _assert_this_initialized(self);
117
- }
118
- function _set_prototype_of(o, p) {
119
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
120
- o.__proto__ = p;
121
- return o;
122
- };
123
- return _set_prototype_of(o, p);
124
- }
125
- function _super_prop_base(object, property) {
126
- while(!Object.prototype.hasOwnProperty.call(object, property)){
127
- object = _get_prototype_of(object);
128
- if (object === null) break;
129
- }
130
- return object;
131
- }
132
- function _to_consumable_array(arr) {
133
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
134
- }
135
- function _type_of(obj) {
136
- "@swc/helpers - typeof";
137
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
138
- }
139
- function _unsupported_iterable_to_array(o, minLen) {
140
- if (!o) return;
141
- if (typeof o === "string") return _array_like_to_array(o, minLen);
142
- var n = Object.prototype.toString.call(o).slice(8, -1);
143
- if (n === "Object" && o.constructor) n = o.constructor.name;
144
- if (n === "Map" || n === "Set") return Array.from(n);
145
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
146
- }
147
- function _is_native_reflect_construct() {
148
- try {
149
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
150
- } catch (_) {}
151
- return (_is_native_reflect_construct = function() {
152
- return !!result;
153
- })();
154
- }
155
- var last = _necessary.arrayUtilities.last;
156
- var termNodeQuery = (0, _query.nodeQuery)("/term"), typeNodeQuery = (0, _query.nodeQuery)("/type");
157
- var ConstructorVerifier = /*#__PURE__*/ function(Verifier) {
158
- _inherits(ConstructorVerifier, Verifier);
159
- function ConstructorVerifier() {
160
- _class_call_check(this, ConstructorVerifier);
161
- return _call_super(this, ConstructorVerifier, arguments);
162
- }
163
- _create_class(ConstructorVerifier, [
164
- {
165
- key: "verifyTerm",
166
- value: function verifyTerm(termNode, context) {
167
- var termVerifiesAsConstructor;
168
- var nonTerminalNode = termNode, childNodes = nonTerminalNode.getChildNodes(), childNodesVerify = this.verifyChildNodes(childNodes, context, function() {
169
- var verifiesAhead = true;
170
- return verifiesAhead;
171
- });
172
- termVerifiesAsConstructor = childNodesVerify; ///
173
- return termVerifiesAsConstructor;
174
- }
175
- },
176
- {
177
- key: "verifyTerminalNode",
178
- value: function verifyTerminalNode(terminalNode) {
179
- for(var _len = arguments.length, remainingArguments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
180
- remainingArguments[_key - 1] = arguments[_key];
181
- }
182
- var terminalNodeVerifies;
183
- var type = terminalNode.getType();
184
- if (type === _constants.TYPE_TYPE) {
185
- var verifyAhead = remainingArguments.pop(), lastRemainingArgument = last(remainingArguments), context = lastRemainingArgument, content = terminalNode.getContent(), typeString = content; ///
186
- context.debug("The '".concat(typeString, "' type is present in the constructor but has not been declared beforehand."));
187
- terminalNodeVerifies = false;
188
- remainingArguments.push(verifyAhead);
189
- } else {
190
- var _$_get;
191
- terminalNodeVerifies = (_$_get = _get(_get_prototype_of(ConstructorVerifier.prototype), "verifyTerminalNode", this)).call.apply(_$_get, [
192
- this,
193
- terminalNode
194
- ].concat(_to_consumable_array(remainingArguments)));
195
- }
196
- return terminalNodeVerifies;
197
- }
198
- }
199
- ]);
200
- return ConstructorVerifier;
201
- }(_verifier.default);
202
- _define_property(ConstructorVerifier, "maps", [
203
- {
204
- nodeQuery: termNodeQuery,
205
- verify: function(termNode, context, verifyAhead) {
206
- var Term = _ontology.default.Term, term = Term.fromTermNode(termNode, context), termVerifies = term.verify(context, verifyAhead);
207
- return termVerifies;
208
- }
209
- },
210
- {
211
- nodeQuery: typeNodeQuery,
212
- verify: function(typeNode, context, verifyAhead) {
213
- var typeVerifies;
214
- var nominalTypeName = typeNode.getNominalTypeName(), typePresent = context.isTypePresentByNominalTypeName(nominalTypeName);
215
- if (typePresent) {
216
- var verifiesAhead = verifyAhead();
217
- typeVerifies = verifiesAhead; ///
218
- } else {
219
- var typeString = nominalTypeName; ///
220
- context.debug("The '".concat(typeString, "' type is not present."));
221
- typeVerifies = false;
222
- }
223
- return typeVerifies;
224
- }
225
- }
226
- ]);
227
- var constructorVerifier = new ConstructorVerifier();
228
- var _default = constructorVerifier;
229
-
230
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92ZXJpZmllci9jb25zdHJ1Y3Rvci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHsgYXJyYXlVdGlsaXRpZXMgfSBmcm9tIFwibmVjZXNzYXJ5XCI7XG5cbmltcG9ydCBvbnRvbG9neSBmcm9tIFwiLi4vb250b2xvZ3lcIjtcbmltcG9ydCBWZXJpZmllciBmcm9tIFwiLi4vdmVyaWZpZXJcIjtcblxuaW1wb3J0IHsgbm9kZVF1ZXJ5IH0gZnJvbSBcIi4uL3V0aWxpdGllcy9xdWVyeVwiO1xuaW1wb3J0IHsgVFlQRV9UWVBFIH0gZnJvbSBcIi4uL2NvbnN0YW50c1wiO1xuXG5jb25zdCB7IGxhc3QgfSA9IGFycmF5VXRpbGl0aWVzO1xuXG5jb25zdCB0ZXJtTm9kZVF1ZXJ5ID0gbm9kZVF1ZXJ5KFwiL3Rlcm1cIiksXG4gICAgICB0eXBlTm9kZVF1ZXJ5ID0gbm9kZVF1ZXJ5KFwiL3R5cGVcIik7XG5cbmNsYXNzIENvbnN0cnVjdG9yVmVyaWZpZXIgZXh0ZW5kcyBWZXJpZmllciB7XG4gIHZlcmlmeVRlcm0odGVybU5vZGUsIGNvbnRleHQpIHtcbiAgICBsZXQgdGVybVZlcmlmaWVzQXNDb25zdHJ1Y3RvcjtcblxuICAgIGNvbnN0IG5vblRlcm1pbmFsTm9kZSA9IHRlcm1Ob2RlLCAvLy9cbiAgICAgICAgICBj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