occam-verify-cli 1.0.825 → 1.0.827

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 (129) hide show
  1. package/lib/element/assertion/contained.js +9 -5
  2. package/lib/element/assertion/property.js +9 -5
  3. package/lib/element/assertion/satisfies.js +9 -5
  4. package/lib/element/assertion/subproof.js +9 -5
  5. package/lib/element/assertion/type.js +9 -9
  6. package/lib/element/assertion.js +4 -3
  7. package/lib/element/assumption.js +7 -6
  8. package/lib/element/combinator.js +8 -7
  9. package/lib/element/conclusion.js +8 -7
  10. package/lib/element/constructor.js +7 -6
  11. package/lib/element/declaration/combinator.js +7 -8
  12. package/lib/element/declaration/complexType.js +25 -26
  13. package/lib/element/declaration/constructor.js +10 -11
  14. package/lib/element/declaration/metavariable.js +10 -11
  15. package/lib/element/declaration/simpleType.js +19 -20
  16. package/lib/element/declaration/typePrefix.js +7 -8
  17. package/lib/element/declaration/variable.js +10 -11
  18. package/lib/element/deduction.js +8 -7
  19. package/lib/element/derivation.js +10 -3
  20. package/lib/element/equality.js +8 -7
  21. package/lib/element/equivalence.js +10 -3
  22. package/lib/element/error.js +10 -3
  23. package/lib/element/frame.js +8 -7
  24. package/lib/element/hypothesis.js +8 -7
  25. package/lib/element/judgement.js +8 -7
  26. package/lib/element/label.js +8 -7
  27. package/lib/element/metaType.js +7 -6
  28. package/lib/element/metavariable.js +6 -5
  29. package/lib/element/parameter.js +8 -7
  30. package/lib/element/procedureCall.js +8 -7
  31. package/lib/element/procedureReference.js +8 -7
  32. package/lib/element/proof.js +10 -3
  33. package/lib/element/proofAssertion/premise.js +5 -5
  34. package/lib/element/proofAssertion/step.js +3 -3
  35. package/lib/element/proofAssertion/supposition.js +5 -5
  36. package/lib/element/proofAssertion.js +3 -3
  37. package/lib/element/property.js +7 -6
  38. package/lib/element/propertyRelation.js +8 -7
  39. package/lib/element/reference.js +8 -7
  40. package/lib/element/rule.js +13 -13
  41. package/lib/element/section.js +12 -5
  42. package/lib/element/signature.js +7 -6
  43. package/lib/element/statement.js +6 -5
  44. package/lib/element/subDerivation.js +10 -3
  45. package/lib/element/subproof.js +10 -3
  46. package/lib/element/substitution/frame.js +5 -5
  47. package/lib/element/substitution/reference.js +5 -5
  48. package/lib/element/substitution/statement.js +5 -5
  49. package/lib/element/substitution/term.js +5 -5
  50. package/lib/element/substitution.js +6 -5
  51. package/lib/element/term.js +7 -6
  52. package/lib/element/topLevelAssertion/axiom.js +3 -4
  53. package/lib/element/topLevelAssertion/conjecture.js +3 -4
  54. package/lib/element/topLevelAssertion/lemma.js +3 -4
  55. package/lib/element/topLevelAssertion/theorem.js +3 -4
  56. package/lib/element/topLevelAssertion.js +9 -7
  57. package/lib/element/topLevelMetaAssertion/metaLemma.js +3 -4
  58. package/lib/element/topLevelMetaAssertion/metatheorem.js +3 -4
  59. package/lib/element/topLevelMetaAssertion.js +12 -10
  60. package/lib/element/type.js +9 -8
  61. package/lib/element/typePrefix.js +8 -7
  62. package/lib/element/variable.js +7 -6
  63. package/lib/process/verify.js +17 -17
  64. package/lib/utilities/element.js +127 -93
  65. package/package.json +4 -4
  66. package/src/element/assertion/contained.js +10 -4
  67. package/src/element/assertion/property.js +10 -4
  68. package/src/element/assertion/satisfies.js +10 -4
  69. package/src/element/assertion/subproof.js +10 -4
  70. package/src/element/assertion/type.js +13 -15
  71. package/src/element/assertion.js +3 -1
  72. package/src/element/assumption.js +7 -5
  73. package/src/element/combinator.js +7 -5
  74. package/src/element/conclusion.js +7 -5
  75. package/src/element/constructor.js +6 -4
  76. package/src/element/declaration/combinator.js +6 -9
  77. package/src/element/declaration/complexType.js +24 -33
  78. package/src/element/declaration/constructor.js +9 -13
  79. package/src/element/declaration/metavariable.js +9 -13
  80. package/src/element/declaration/simpleType.js +19 -26
  81. package/src/element/declaration/typePrefix.js +6 -9
  82. package/src/element/declaration/variable.js +9 -13
  83. package/src/element/deduction.js +7 -5
  84. package/src/element/derivation.js +13 -2
  85. package/src/element/equality.js +7 -5
  86. package/src/element/equivalence.js +13 -2
  87. package/src/element/error.js +13 -3
  88. package/src/element/frame.js +7 -5
  89. package/src/element/hypothesis.js +7 -5
  90. package/src/element/judgement.js +7 -5
  91. package/src/element/label.js +7 -5
  92. package/src/element/metaType.js +7 -4
  93. package/src/element/metavariable.js +6 -4
  94. package/src/element/parameter.js +7 -5
  95. package/src/element/procedureCall.js +7 -5
  96. package/src/element/procedureReference.js +7 -5
  97. package/src/element/proof.js +13 -2
  98. package/src/element/proofAssertion/premise.js +4 -4
  99. package/src/element/proofAssertion/step.js +2 -2
  100. package/src/element/proofAssertion/supposition.js +4 -4
  101. package/src/element/proofAssertion.js +2 -2
  102. package/src/element/property.js +6 -4
  103. package/src/element/propertyRelation.js +7 -5
  104. package/src/element/reference.js +7 -5
  105. package/src/element/rule.js +15 -17
  106. package/src/element/section.js +15 -5
  107. package/src/element/signature.js +7 -5
  108. package/src/element/statement.js +5 -3
  109. package/src/element/subDerivation.js +13 -2
  110. package/src/element/subproof.js +13 -2
  111. package/src/element/substitution/frame.js +4 -4
  112. package/src/element/substitution/reference.js +4 -4
  113. package/src/element/substitution/statement.js +4 -4
  114. package/src/element/substitution/term.js +4 -4
  115. package/src/element/substitution.js +5 -3
  116. package/src/element/term.js +6 -4
  117. package/src/element/topLevelAssertion/axiom.js +2 -4
  118. package/src/element/topLevelAssertion/conjecture.js +2 -4
  119. package/src/element/topLevelAssertion/lemma.js +2 -4
  120. package/src/element/topLevelAssertion/theorem.js +2 -4
  121. package/src/element/topLevelAssertion.js +11 -7
  122. package/src/element/topLevelMetaAssertion/metaLemma.js +2 -4
  123. package/src/element/topLevelMetaAssertion/metatheorem.js +2 -4
  124. package/src/element/topLevelMetaAssertion.js +14 -11
  125. package/src/element/type.js +8 -5
  126. package/src/element/typePrefix.js +7 -5
  127. package/src/element/variable.js +6 -4
  128. package/src/process/verify.js +16 -16
  129. package/src/utilities/element.js +194 -84
@@ -29,11 +29,12 @@ export function typeFromTypeNode(typeNode, context) {
29
29
  provisional = provisionalFromTypeNode(typeNode, context),
30
30
  nominalTypeName = nominalTypeNameFromTypeNode(typeNode, context),
31
31
  typeString = typeStringFromNominalTypeName(nominalTypeName),
32
- string = typeString; ///
32
+ string = typeString, ///
33
+ lineIndex = null;
33
34
 
34
35
  context = null;
35
36
 
36
- type = new Type(context, string, node, name, prefixName, superTypes, properties, provisional);
37
+ type = new Type(context, string, node, lineIndex, prefixName, superTypes, properties, provisional);
37
38
  }
38
39
 
39
40
  return type;
@@ -43,11 +44,12 @@ export function termFromTermNode(termNode, context) {
43
44
  const { Term } = elements,
44
45
  node = termNode, ///
45
46
  string = context.nodeAsString(node),
47
+ lineIndex = null,
46
48
  type = typeFromTermNode(termNode, context);
47
49
 
48
50
  context = null;
49
51
 
50
- const term = new Term(context, string, node, type);
52
+ const term = new Term(context, string, node, lineIndex, type);
51
53
 
52
54
  return term;
53
55
  }
@@ -56,13 +58,14 @@ export function stepFromStepNode(stepNode, context) {
56
58
  const { Step } = elements,
57
59
  node = stepNode, ///
58
60
  string = context.nodeAsString(node),
61
+ lineIndex = null,
59
62
  statement = statementFromStepNode(stepNode, context),
60
63
  reference = referenceFromStepNode(stepNode, context),
61
64
  satisfiesAssertion = satisfiesAssertionFromStepNode(stepNode, context);
62
65
 
63
66
  context = null;
64
67
 
65
- const step = new Step(context, string, node, statement, reference, satisfiesAssertion);
68
+ const step = new Step(context, string, node, lineIndex, statement, reference, satisfiesAssertion);
66
69
 
67
70
  return step;
68
71
  }
@@ -76,7 +79,11 @@ export function ruleFromRuleNode(ruleNode, context) {
76
79
  ruleString = rulsStringFromLabelsPremisesAndConclusion(labels, premises, conclusion),
77
80
  node = ruleNode, ///
78
81
  string = ruleString, ///
79
- rule = new Rule(context, string, node, proof, labels, premises, conclusion);
82
+ lineIndex = null;
83
+
84
+ context = null;
85
+
86
+ const rule = new Rule(context, string, node, lineIndex, proof, labels, premises, conclusion);
80
87
 
81
88
  return rule;
82
89
  }
@@ -85,8 +92,9 @@ export function labelFromLabelNode(labelNode, context) {
85
92
  const { Label } = elements,
86
93
  node = labelNode, ///
87
94
  string = context.nodeAsString(node),
95
+ lineIndex = null,
88
96
  metavariable = metavariableFromLabelNode(labelNode, context),
89
- label = new Label(context, string, node, metavariable);
97
+ label = new Label(context, string, node, lineIndex, metavariable);
90
98
 
91
99
  return label;
92
100
  }
@@ -95,7 +103,11 @@ export function errorFromErrorNode(errorNode, context) {
95
103
  const { Error } = elements,
96
104
  node = errorNode, ///
97
105
  string = context.nodeAsString(node),
98
- error = new Error(context, string, node);
106
+ lineIndex = null;
107
+
108
+ context = null;
109
+
110
+ const error = new Error(context, string, node, lineIndex);
99
111
 
100
112
  return error;
101
113
  }
@@ -112,7 +124,11 @@ export function lemmaFromLemmaNode(lemmaNode, context) {
112
124
  topLevelAsssertionString = topLevelAssertionStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
113
125
  node = lemmaNode, ///
114
126
  string = topLevelAsssertionString, ///
115
- lemma = new Lemma(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
127
+ lineIndex = null;
128
+
129
+ context = null;
130
+
131
+ const lemma = new Lemma(context, string, node, lineIndex, labels, suppositions, deduction, proof, signature, hypotheses);
116
132
 
117
133
  return lemma;
118
134
  }
@@ -121,12 +137,13 @@ export function frameFromFrameNode(frameNode, context) {
121
137
  const { Frame } = elements,
122
138
  node = frameNode, ///
123
139
  string = context.nodeAsString(node),
140
+ lineIndex = null,
124
141
  assumptions = assumptionsFromFrameNode(frameNode, context),
125
142
  metavariable = metavariableFromFrameNode(frameNode, context);
126
143
 
127
144
  context = null;
128
145
 
129
- const frame = new Frame(context, string, node, assumptions, metavariable);
146
+ const frame = new Frame(context, string, node, lineIndex, assumptions, metavariable);
130
147
 
131
148
  return frame;
132
149
  }
@@ -135,11 +152,12 @@ export function proofFromProofNode(proofNode, context) {
135
152
  const { Proof } = elements,
136
153
  node = proofNode, ///
137
154
  string = null,
155
+ lineIndex = null,
138
156
  derivation = derivationFromProofNode(proofNode, context);
139
157
 
140
158
  context = null;
141
159
 
142
- const proof = new Proof(context, string, node, derivation);
160
+ const proof = new Proof(context, string, node, lineIndex, derivation);
143
161
 
144
162
  return proof;
145
163
  }
@@ -156,7 +174,8 @@ export function axiomFromAxiomNode(axiomNode, context) {
156
174
  topLevelAsssertionString = topLevelAssertionStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
157
175
  node = axiomNode, ///
158
176
  string = topLevelAsssertionString, ///
159
- axiom = new Axiom(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
177
+ lineIndex = null,
178
+ axiom = new Axiom(context, string, node, lineIndex, labels, suppositions, deduction, proof, signature, hypotheses);
160
179
 
161
180
  return axiom;
162
181
  }
@@ -170,11 +189,12 @@ export function sectionFromSectionNode(sectionNode, context) {
170
189
  conjecture = conjectureFromSectionNode(sectionNode, context),
171
190
  sectionString = sectionStringFromHypothesesTopLevelAssertion(hypotheses, axiom, lemma, theorem, conjecture),
172
191
  node = sectionNode, ///
173
- string = sectionString; ///
192
+ string = sectionString, ///
193
+ lineIndex = null;
174
194
 
175
195
  context = null;
176
196
 
177
- const section = new Section(context, string, node, hypotheses, axiom, lemma, theorem, conjecture);
197
+ const section = new Section(context, string, node, lineIndex, hypotheses, axiom, lemma, theorem, conjecture);
178
198
 
179
199
  return section;
180
200
  }
@@ -183,12 +203,10 @@ export function premiseFromPremiseNode(premiseNode, context) {
183
203
  const { Premise } = elements,
184
204
  node = premiseNode, ///
185
205
  string = context.nodeAsString(node),
206
+ lineIndex = null,
186
207
  statement = statementFromPremiseNode(premiseNode, context),
187
- procedureCall = procedureCallFromPremiseNode(premiseNode, context);
188
-
189
- context = null;
190
-
191
- const premise = new Premise(context, string, node, statement, procedureCall);
208
+ procedureCall = procedureCallFromPremiseNode(premiseNode, context),
209
+ premise = new Premise(context, string, node, lineIndex, statement, procedureCall);
192
210
 
193
211
  return premise
194
212
  }
@@ -205,7 +223,11 @@ export function theoremFromTheoremNode(theoremNode, context) {
205
223
  topLevelAsssertionString = topLevelAssertionStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
206
224
  node = theoremNode, ///
207
225
  string = topLevelAsssertionString, ///
208
- theorem = new Theorem(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
226
+ lineIndex = null;
227
+
228
+ context = null;
229
+
230
+ const theorem = new Theorem(context, string, node, lineIndex, labels, suppositions, deduction, proof, signature, hypotheses);
209
231
 
210
232
  return theorem;
211
233
  }
@@ -214,13 +236,14 @@ export function propertyFromPropertyNode(propertyNode, context) {
214
236
  const { Property } = elements,
215
237
  node = propertyNode, ///
216
238
  string = context.nodeAsString(node),
239
+ lineIndex = null,
217
240
  propertyName = propertyNode.getPropertyName(),
218
241
  nominalTypeName = null,
219
242
  name = propertyName; ///
220
243
 
221
244
  context = null;
222
245
 
223
- const property = new Property(context, string, node, name, nominalTypeName);
246
+ const property = new Property(context, string, node, lineIndex, name, nominalTypeName);
224
247
 
225
248
  return property;
226
249
  }
@@ -229,13 +252,14 @@ export function variableFromVariableNode(variableNode, context) {
229
252
  const { Variable } = elements,
230
253
  node = variableNode, ///
231
254
  string = context.nodeAsString(node),
255
+ lineIndex = null,
232
256
  type = null,
233
257
  identifier = identifierFromVarialbeNode(variableNode, context),
234
258
  propertyRelations = [];
235
259
 
236
260
  context = null;
237
261
 
238
- const variable = new Variable(context, string, node, type, identifier, propertyRelations);
262
+ const variable = new Variable(context, string, node, lineIndex, type, identifier, propertyRelations);
239
263
 
240
264
  return variable;
241
265
  }
@@ -246,11 +270,12 @@ export function subproofFromSubproofNode(subproofNode, context) {
246
270
  suppositions = suppositionsFromSubproofNode(subproofNode, context),
247
271
  subDerivation = subDerivationFromSubproofNode(subproofNode, context),
248
272
  subproofString = subproofStringFromSuppositionsAndSubDerivation(suppositions, subDerivation, context),
249
- string = subproofString; ///
273
+ string = subproofString, ///
274
+ lineIndex = null;
250
275
 
251
276
  context = null;
252
277
 
253
- const subproof = new Subproof(context, string, node, suppositions, subDerivation);
278
+ const subproof = new Subproof(context, string, node, lineIndex, suppositions, subDerivation);
254
279
 
255
280
  return subproof;
256
281
  }
@@ -259,12 +284,13 @@ export function equalityFromEqualityNode(equalityNode, context) {
259
284
  const { Equality } = elements,
260
285
  node = equalityNode, ///
261
286
  string = context.nodeAsString(node),
287
+ lineIndex = null,
262
288
  leftTerm = leftTermFromEqualityNode(equalityNode, context),
263
289
  rightTerm = rightTermFromEqualityNode(equalityNode, context);
264
290
 
265
291
  context = null;
266
292
 
267
- const equality = new Equality(context, string, node, leftTerm, rightTerm);
293
+ const equality = new Equality(context, string, node, lineIndex, leftTerm, rightTerm);
268
294
 
269
295
  return equality;
270
296
  }
@@ -273,8 +299,9 @@ export function deductionFromDeductionNode(deductionNode, context) {
273
299
  const { Deduction } = elements,
274
300
  node = deductionNode, ///
275
301
  string = context.nodeAsString(node),
302
+ lineIndex = null,
276
303
  statement = statementFromDeductionNode(deductionNode, context),
277
- deduction = new Deduction(context, string, node, statement);
304
+ deduction = new Deduction(context, string, node, lineIndex, statement);
278
305
 
279
306
  return deduction;
280
307
  }
@@ -282,11 +309,12 @@ export function deductionFromDeductionNode(deductionNode, context) {
282
309
  export function statementFromStatementNode(statementNode, context) {
283
310
  const { Statement } = elements,
284
311
  node = statementNode, ///
285
- string = context.nodeAsString(node);
312
+ string = context.nodeAsString(node),
313
+ lineIndex = null;
286
314
 
287
315
  context = null;
288
316
 
289
- const statement = new Statement(context, string, node);
317
+ const statement = new Statement(context, string, node, lineIndex);
290
318
 
291
319
  return statement;
292
320
  }
@@ -295,11 +323,12 @@ export function signatureFromSignatureNode(signatureNode, context) {
295
323
  const { Signature } = elements,
296
324
  node = signatureNode, ///
297
325
  string = context.nodeAsString(node),
326
+ lineIndex = null,
298
327
  terms = termsFromSignatureNode(signatureNode, context);
299
328
 
300
329
  context = null;
301
330
 
302
- const signature = new Signature(context, string, node, terms);
331
+ const signature = new Signature(context, string, node, lineIndex, terms);
303
332
 
304
333
  return signature;
305
334
  }
@@ -308,9 +337,10 @@ export function referenceFromReferenceNode(referenceNode, context) {
308
337
  const { Reference } = elements,
309
338
  node = referenceNode, ///
310
339
  string = context.nodeAsString(node),
340
+ lineIndex = null,
311
341
  metavariable = metavariableFromReferenceNode(referenceNode, context),
312
342
  topLevelMetaAssertion = topLevelMetaAssertionFromReferenceNode(referenceNode, context),
313
- reference = new Reference(context, string, node, metavariable, topLevelMetaAssertion);
343
+ reference = new Reference(context, string, node, lineIndex, metavariable, topLevelMetaAssertion);
314
344
 
315
345
  return reference;
316
346
  }
@@ -319,12 +349,13 @@ export function judgementFromJudgementNode(judgementNode, context) {
319
349
  const { Judgement } = elements,
320
350
  node = judgementNode, ///
321
351
  string = context.nodeAsString(node),
352
+ lineIndex = null,
322
353
  frame = frameFromJudgementNode(judgementNode, context),
323
354
  assumption = assumptionFromJudgementNode(judgementNode, context);
324
355
 
325
356
  context = null;
326
357
 
327
- const judgement = new Judgement(context, string, node, frame, assumption);
358
+ const judgement = new Judgement(context, string, node, lineIndex, frame, assumption);
328
359
 
329
360
  return judgement;
330
361
  }
@@ -340,7 +371,11 @@ export function metaLemmaFromMetaLemmaNode(metaLemmaNode, context) {
340
371
  topLevelMetaAssertionString = topLevelMetaAssertionStringFromLabelSuppositionsDeductionAndMetaLevelAssumptions(label, suppositions, deduction, metaLevelAssumptions),
341
372
  node = metaLemmaMetathoremNode, ///
342
373
  string = topLevelMetaAssertionString, ///
343
- metaLemma = new MetaLemma(context, string, node, label, suppositions, deduction, proof, metaLevelAssumptions);
374
+ lineIndex = null;
375
+
376
+ context = null;
377
+
378
+ const metaLemma = new MetaLemma(context, string, node, lineIndex, label, suppositions, deduction, proof, metaLevelAssumptions);
344
379
 
345
380
  return metaLemma;
346
381
  }
@@ -349,12 +384,13 @@ export function parameterFromParameterNode(parameterNode, context) {
349
384
  const { Parameter } = elements,
350
385
  node = parameterNode, ///
351
386
  string = context.nodeAsString(node),
387
+ lineIndex = null,
352
388
  name = parameterNode.getName(),
353
389
  identifier = parameterNode.getIdentifier();
354
390
 
355
391
  context = null;
356
392
 
357
- const parameter = new Parameter(context, string, node, name, identifier);
393
+ const parameter = new Parameter(context, string, node, lineIndex, name, identifier);
358
394
 
359
395
  return parameter;
360
396
  }
@@ -363,11 +399,12 @@ export function signatureFromJSignatureNode(signatureNode, context) {
363
399
  const { Signature } = elements,
364
400
  node = signatureNode,
365
401
  string = context.nodeAsString(node),
402
+ lineIndex = null,
366
403
  terms = termsFromSignatureNode(signatureNode, context);
367
404
 
368
405
  context = null;
369
406
 
370
- const signature = new Signature(context, string, node, terms);
407
+ const signature = new Signature(context, string, node, lineIndex, terms);
371
408
 
372
409
  return signature;
373
410
  }
@@ -376,11 +413,12 @@ export function hypothesisFromHypothesisNode(hypotheseNode, context) {
376
413
  const { Hypothsis } = elements,
377
414
  node = hypotheseNode, ///
378
415
  string = context.nodeAsString(node),
416
+ lineIndex = null,
379
417
  statement = statementFromHypothesisNode(hypotheseNode, context);
380
418
 
381
419
  context = null;
382
420
 
383
- const hypohtesis = new Hypothsis(context, string, node, statement);
421
+ const hypohtesis = new Hypothsis(context, string, node, lineIndex, statement);
384
422
 
385
423
  return hypohtesis;
386
424
  }
@@ -397,7 +435,11 @@ export function conjectureFromConjectureNode(conjectureNode, context) {
397
435
  topLevelAsssertionString = topLevelAssertionStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
398
436
  node = conjectureNode, ///
399
437
  string = topLevelAsssertionString, ///
400
- conjecture = new Conjecture(context, string, node, labels, suppositions, deduction, proof, signature, hypotheses);
438
+ lineIndex = null;
439
+
440
+ context = null;
441
+
442
+ const conjecture = new Conjecture(context, string, node, lineIndex, labels, suppositions, deduction, proof, signature, hypotheses);
401
443
 
402
444
  return conjecture;
403
445
  }
@@ -406,8 +448,12 @@ export function combinatorFromCombinatorNode(combinatorNode, context) {
406
448
  const { Combinator } = elements,
407
449
  node = combinatorNode, ///
408
450
  string = context.nodeAsString(node),
409
- statement = statementFromCombinatorNode(combinatorNode, context),
410
- combinator = new Combinator(context, string, node, statement);
451
+ lineIndex = null,
452
+ statement = statementFromCombinatorNode(combinatorNode, context);
453
+
454
+ context = null;
455
+
456
+ const combinator = new Combinator(context, string, node, lineIndex, statement);
411
457
 
412
458
  return combinator;
413
459
  }
@@ -416,8 +462,9 @@ export function conclusionFromConclusionNode(conclusionNode, context) {
416
462
  const { Conclusion } = elements,
417
463
  node = conclusionNode, ///
418
464
  string = context.nodeAsString(node),
465
+ lineIndex = null,
419
466
  statement = statementFromConclusionNode(conclusionNode, context),
420
- conclusion = new Conclusion(context, string, node, statement);
467
+ conclusion = new Conclusion(context, string, node, lineIndex, statement);
421
468
 
422
469
  return conclusion;
423
470
  }
@@ -426,11 +473,12 @@ export function derivationFromDerivationNode(derivationNode, context) {
426
473
  const { Derivation } = elements,
427
474
  node = derivationNode, ///
428
475
  string = null,
476
+ lineIndex = null,
429
477
  stepsOrSubproofs = stepsOrSubproofsFromDerivationNode(derivationNode, context);
430
478
 
431
479
  context = null;
432
480
 
433
- const derivation = new Derivation(context, string, node, stepsOrSubproofs);
481
+ const derivation = new Derivation(context, string, node, lineIndex, stepsOrSubproofs);
434
482
 
435
483
  return derivation;
436
484
  }
@@ -439,12 +487,13 @@ export function typePrefixFromTypePrefixNode(typePrefixNode, context) {
439
487
  const { TypePrefix } = elements,
440
488
  node = typePrefixNode, ///
441
489
  string = context.nodeAsString(node),
490
+ lineIndex = null,
442
491
  term = termFromTypePrefixNode(typePrefixNode, context),
443
492
  type = typeFromTypePrefixNode(typePrefixNode, context);
444
493
 
445
494
  context = null;
446
495
 
447
- const typePrefix = new TypePrefix(context, string, node, term, type);
496
+ const typePrefix = new TypePrefix(context, string, node, lineIndex, term, type);
448
497
 
449
498
  return typePrefix;
450
499
  }
@@ -453,9 +502,13 @@ export function assumptionFromAssumptionNode(assumptionNode, context) {
453
502
  const { Assumption } = elements,
454
503
  node = assumptionNode, ///
455
504
  string = context.nodeAsString(node),
505
+ lineIndex = null,
456
506
  reference = referenceFromAssumptionNode(assumptionNode, context),
457
- statement = statementFromAssumptionNode(assumptionNode, context),
458
- assumption = new Assumption(context, string, node, reference, statement);
507
+ statement = statementFromAssumptionNode(assumptionNode, context);
508
+
509
+ context = null;
510
+
511
+ const assumption = new Assumption(context, string, node, lineIndex, reference, statement);
459
512
 
460
513
  return assumption;
461
514
  }
@@ -464,9 +517,13 @@ export function constructorFromConstructorNode(constructorNode, context) {
464
517
  const { Constructor } = elements,
465
518
  node = constructorNode, ///
466
519
  string = context.nodeAsString(node),
520
+ lineIndex = null,
467
521
  term = termFromConstructorNode(constructorNode, context),
468
- type = typeFromConstructorNode(constructorNode, context),
469
- constructor = new Constructor(context, string, node, term, type);
522
+ type = typeFromConstructorNode(constructorNode, context);
523
+
524
+ context = null;
525
+
526
+ const constructor = new Constructor(context, string, node, lineIndex, term, type);
470
527
 
471
528
  return constructor;
472
529
  }
@@ -475,12 +532,10 @@ export function suppositionFromSuppositionNode(suppositionNode, context) {
475
532
  const { Supposition } = elements,
476
533
  node = suppositionNode, ///
477
534
  string = context.nodeAsString(node),
535
+ lineIndex = null,
478
536
  statement = statementFromSuppositionNode(suppositionNode, context),
479
- procedureCall = procedureCallFromSuppositionNode(suppositionNode, context);
480
-
481
- context = null;
482
-
483
- const supposition = new Supposition(context, string, node, statement, procedureCall);
537
+ procedureCall = procedureCallFromSuppositionNode(suppositionNode, context),
538
+ supposition = new Supposition(context, string, node, lineIndex, statement, procedureCall);
484
539
 
485
540
  return supposition
486
541
  }
@@ -488,6 +543,7 @@ export function suppositionFromSuppositionNode(suppositionNode, context) {
488
543
  export function equivalenceFromEquivalenceNode(equivalenceNode, context) {
489
544
  const { Equivalence } = elements,
490
545
  node = equivalenceNode, ///
546
+ lineIndex = null,
491
547
  type = typeFromEquivalenceNode(equivalenceNode, context),
492
548
  terms = termsFromEquivalenceNode(equivalenceNode, context),
493
549
  equivalenceString = equivalenceStringFromTerms(terms),
@@ -495,7 +551,7 @@ export function equivalenceFromEquivalenceNode(equivalenceNode, context) {
495
551
 
496
552
  context = null;
497
553
 
498
- const equivalence = new Equivalence(context, string, node, type, terms);
554
+ const equivalence = new Equivalence(context, string, node, lineIndex, type, terms);
499
555
 
500
556
  return equivalence;
501
557
  }
@@ -511,7 +567,11 @@ export function metatheoremFromMetatheoremNode(metatheoremNode, context) {
511
567
  topLevelMetaAssertionString = topLevelMetaAssertionStringFromLabelSuppositionsDeductionAndMetaLevelAssumptions(label, suppositions, deduction, metaLevelAssumptions),
512
568
  node = metaLemmaMetathoremNode, ///
513
569
  string = topLevelMetaAssertionString, ///
514
- metatheorem = new Metatheorem(context, string, node, label, suppositions, deduction, proof, metaLevelAssumptions);
570
+ lineIndex = null;
571
+
572
+ context = null;
573
+
574
+ const metatheorem = new Metatheorem(context, string, node, lineIndex, label, suppositions, deduction, proof, metaLevelAssumptions);
515
575
 
516
576
  return metatheorem;
517
577
  }
@@ -520,11 +580,15 @@ export function metavariableFromMetavariableNode(metavariableNode, context) {
520
580
  const { Metavariable } = elements,
521
581
  node = metavariableNode, ///
522
582
  string = context.nodeAsString(node),
583
+ lineIndex = null,
523
584
  name = nameFromMetavariableNode(metavariableNode, context),
524
585
  term = termFromMetavariableNode(metavariableNode, context),
525
586
  type = typeFromMetavariableNode(metavariableNode, context),
526
- metaType = null,
527
- metavariable = new Metavariable(context, string, node, name, term, type, metaType);
587
+ metaType = null;
588
+
589
+ context = null;
590
+
591
+ const metavariable = new Metavariable(context, string, node, lineIndex, name, term, type, metaType);
528
592
 
529
593
  return metavariable;
530
594
  }
@@ -533,11 +597,12 @@ export function subDerivationFromSubDerivationNode(subDerivationNode, context) {
533
597
  const { SubDerivation } = elements,
534
598
  node = subDerivationNode, ///
535
599
  string = null,
600
+ lineIndex = null,
536
601
  stepsOrSubproofs = stepsOrSubproofsFromSubDerivationNode(subDerivationNode, context);
537
602
 
538
603
  context = null;
539
604
 
540
- const subDerivation = new SubDerivation(context, string, node, stepsOrSubproofs);
605
+ const subDerivation = new SubDerivation(context, string, node, lineIndex, stepsOrSubproofs);
541
606
 
542
607
  return subDerivation;
543
608
  }
@@ -546,12 +611,13 @@ export function typeAssertionFromTypeAssertionNode(typeAssertionNode, context) {
546
611
  const { TypeAssertion } = elements,
547
612
  node = typeAssertionNode, ///
548
613
  string = context.nodeAsString(node),
614
+ lineIndex = null,
549
615
  term = termFromTypeAssertionNode(typeAssertionNode, context),
550
616
  type = typeFromTypeAssertionNode(typeAssertionNode, context);
551
617
 
552
618
  context = null;
553
619
 
554
- const typeAssertion = new TypeAssertion(context, string, node, term, type);
620
+ const typeAssertion = new TypeAssertion(context, string, node, lineIndex, term, type);
555
621
 
556
622
  return typeAssertion;
557
623
  }
@@ -562,11 +628,12 @@ export function procedureCallFromProcedureCallNode(procedureCallNode, context) {
562
628
  procedureReference = procedureReferenceFromProcedureCallNode(procedureCallNode, context),
563
629
  procedureCallString = procedureCallStringFromProcedureReferenceAndParameters(procedureReference, parameters),
564
630
  node = procedureCallNode, ///
565
- string = procedureCallString; ///
631
+ string = procedureCallString, ///
632
+ lineIndex = null;
566
633
 
567
634
  context = null;
568
635
 
569
- const procedureCall = new ProcedureCall(context, string, node, parameters, procedureReference);
636
+ const procedureCall = new ProcedureCall(context, string, node, lineIndex, parameters, procedureReference);
570
637
 
571
638
  return procedureCall;
572
639
  }
@@ -583,13 +650,14 @@ export function definedAssertionFromDefinedAssertionNode(definedAssertionNode, c
583
650
  const { DefinedAssertion } = elements,
584
651
  node = definedAssertionNode, ///
585
652
  string = context.nodeAsString(node),
653
+ lineIndex = null,
586
654
  negated = definedAssertionNode.isNegated(),
587
655
  term = termFromDefinedAssertionNode(definedAssertionNode, context),
588
656
  frame = frameFromDefinedAssertionNode(definedAssertionNode, context);
589
657
 
590
658
  context = null;
591
659
 
592
- const definedAssertion = new DefinedAssertion(context, string, node, term, frame, negated);
660
+ const definedAssertion = new DefinedAssertion(context, string, node, lineIndex, term, frame, negated);
593
661
 
594
662
  return definedAssertion;
595
663
  }
@@ -598,12 +666,13 @@ export function propertyRelationFromPropertyRelationNode(propertyRelationNode, c
598
666
  const { PropertyRelation } = elements,
599
667
  node = propertyRelationNode, ///
600
668
  string = context.nodeAsString(node),
669
+ lineIndex = null,
601
670
  term = termFromPropertyRelationNode(propertyRelationNode, context),
602
671
  property = propertyFromPropertyRelationNode(propertyRelationNode, context);
603
672
 
604
673
  context = null;
605
674
 
606
- const propertyRelation = new PropertyRelation(context, string, node, term, property);
675
+ const propertyRelation = new PropertyRelation(context, string, node, lineIndex, term, property);
607
676
 
608
677
  return propertyRelation;
609
678
  }
@@ -612,10 +681,11 @@ export function termSubstitutionFromTermSubstitutionNode(termSubstitutionNode, c
612
681
  const { TermSubstitution } = elements,
613
682
  node = termSubstitutionNode, ///
614
683
  string = context.nodeAsString(node),
684
+ lineIndex = null,
615
685
  generalContext = generalContextFromTermSubstitutionNode(termSubstitutionNode, context),
616
686
  targetTerm = targetTermFromTermSubstitutionNode(termSubstitutionNode, context),
617
687
  replacementTerm = replacementTermFromTermSubstitutionNode(termSubstitutionNode, context),
618
- termSubstitution = new TermSubstitution(context, string, node, generalContext, targetTerm, replacementTerm);
688
+ termSubstitution = new TermSubstitution(context, string, node, lineIndex, generalContext, targetTerm, replacementTerm);
619
689
 
620
690
  return termSubstitution;
621
691
  }
@@ -624,10 +694,11 @@ export function frameSubstitutionFromFrameSubstitutionNode(frameSubstitutionNode
624
694
  const { FrameSubstitution } = elements,
625
695
  node = frameSubstitutionNode, ///
626
696
  string = context.nodeAsString(node),
697
+ lineIndex = null,
627
698
  generalContext = generalContextFromFrameSubstitutionNode(frameSubstitutionNode, context),
628
699
  targetFrame = targetFrameFromFrameSubstitutionNode(frameSubstitutionNode, context),
629
700
  replacementFrame = replacementFrameFromFrameSubstitutionNode(frameSubstitutionNode, context),
630
- frameSubstitution = new FrameSubstitution(context, string, node, generalContext, targetFrame, replacementFrame);
701
+ frameSubstitution = new FrameSubstitution(context, string, node, lineIndex, generalContext, targetFrame, replacementFrame);
631
702
 
632
703
  return frameSubstitution;
633
704
  }
@@ -636,12 +707,13 @@ export function propertyAssertionFromPropertyAssertionNode(propertyAssertionNode
636
707
  const { PropertyAssertion } = elements,
637
708
  node = propertyAssertionNode, ///
638
709
  string = context.nodeAsString(node),
710
+ lineIndex = null,
639
711
  term = termFromPropertyAssertionNode(propertyAssertionNode, context),
640
712
  propertyRelation = propertyRelationFromPropertyAssertionNode(propertyAssertionNode, context);
641
713
 
642
714
  context = null;
643
715
 
644
- const propertyAssertion = new PropertyAssertion(context, string, node, term, propertyRelation);
716
+ const propertyAssertion = new PropertyAssertion(context, string, node, lineIndex, term, propertyRelation);
645
717
 
646
718
  return propertyAssertion;
647
719
  }
@@ -650,11 +722,12 @@ export function subproofAssertionFromSubproofAssertionNode(subproofAssertionNode
650
722
  const { SubproofAssertion } = elements,
651
723
  node = subproofAssertionNode, ///
652
724
  string = context.nodeAsString(node),
725
+ lineIndex = null,
653
726
  statements = statementsFromSubproofAssertionNode(subproofAssertionNode, context);
654
727
 
655
728
  context = null;
656
729
 
657
- const subproofAssertion = new SubproofAssertion(context, string, node, statements);
730
+ const subproofAssertion = new SubproofAssertion(context, string, node, lineIndex, statements);
658
731
 
659
732
  return subproofAssertion;
660
733
  }
@@ -663,6 +736,7 @@ export function containedAssertionFromContainedAssertionNode(containedAssertionN
663
736
  const { ContainedAssertion } = elements,
664
737
  node = containedAssertionNode, ///
665
738
  string = context.nodeAsString(node),
739
+ lineIndex = null,
666
740
  negated = containedAssertionNode.isNegated(),
667
741
  term = termFromContainedAssertionNode(containedAssertionNode, context),
668
742
  frame = frameFromContainedAssertionNode(containedAssertionNode, context),
@@ -670,7 +744,7 @@ export function containedAssertionFromContainedAssertionNode(containedAssertionN
670
744
 
671
745
  context = null;
672
746
 
673
- const containedAssertion = new ContainedAssertion(context, string, node, term, frame, negated, statement);
747
+ const containedAssertion = new ContainedAssertion(context, string, node, lineIndex, term, frame, negated, statement);
674
748
 
675
749
  return containedAssertion;
676
750
  }
@@ -679,12 +753,13 @@ export function satisfiesAssertionFromSatisfiesAssertionNode(satisfiesAssertionN
679
753
  const { SatisfiesAssertion } = elements,
680
754
  node = satisfiesAssertionNode, ///
681
755
  string = context.nodeAsString(node),
756
+ lineIndex = null,
682
757
  signature = signatureFromSatisfiesAssertionNode(satisfiesAssertionNode, context),
683
758
  reference = referenceFromSatisfiesAssertionNode(satisfiesAssertionNode, context);
684
759
 
685
760
  context = null;
686
761
 
687
- const satisfiesAssertion = new SatisfiesAssertion(context, string, node, signature, reference);
762
+ const satisfiesAssertion = new SatisfiesAssertion(context, string, node, lineIndex, signature, reference);
688
763
 
689
764
  return satisfiesAssertion;
690
765
  }
@@ -693,11 +768,12 @@ export function procedureReferenceFromProcedureReferenceNode(procedureReferenceN
693
768
  const { ProcedureReference } = elements,
694
769
  node = procedureReferenceNode, ///
695
770
  string = context.nodeAsString(node),
771
+ lineIndex = null,
696
772
  name = nameFromProcedureReferenceNode(procedureReferenceNode, context);
697
773
 
698
774
  context = null;
699
775
 
700
- const procedureRefereence = new ProcedureReference(context, string, node, name);
776
+ const procedureRefereence = new ProcedureReference(context, string, node, lineIndex, name);
701
777
 
702
778
  return procedureRefereence;
703
779
  }
@@ -706,12 +782,16 @@ export function variableDeclarationFromVariableDeclarationNode(variableDeclarati
706
782
  const { VariableDeclaration } = elements,
707
783
  node = variableDeclarationNode, ///
708
784
  string = context.nodeAsString(node),
785
+ lineIndex = null,
709
786
  typeNode = variableDeclarationNode.getTypeNode(),
710
787
  provisional = variableDeclarationNode.isProvisional(),
711
788
  variableNode = variableDeclarationNode.getVariableNode(),
712
789
  type = typeFromTypeNode(typeNode, context),
713
- variable = variableFromVariableNode(variableNode, context),
714
- variableDeclaration = new VariableDeclaration(context, string, node, type, variable, provisional);
790
+ variable = variableFromVariableNode(variableNode, context);
791
+
792
+ context = null;
793
+
794
+ const variableDeclaration = new VariableDeclaration(context, string, node, lineIndex, type, variable, provisional);
715
795
 
716
796
  return variableDeclaration;
717
797
  }
@@ -720,9 +800,13 @@ export function metaLevelAssumptionFromMetaLevelAssumptionNode(metaLevelAssumpti
720
800
  const { MetaLevelAssumption } = elements,
721
801
  node = metaLevelAssumptionNode, ///
722
802
  string = context.nodeAsString(node),
803
+ lineIndex = null,
723
804
  reference = referenceFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context),
724
- statement = statementFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context),
725
- metaLevelAssumption = new MetaLevelAssumption(context, string, node, reference, statement);
805
+ statement = statementFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context);
806
+
807
+ context = null;
808
+
809
+ const metaLevelAssumption = new MetaLevelAssumption(context, string, node, lineIndex, reference, statement);
726
810
 
727
811
  return metaLevelAssumption;
728
812
  }
@@ -731,8 +815,12 @@ export function typePrefixDeclarationFromTypePrefixDeclarationNode(typePrefixDec
731
815
  const { TypePrefixDeclaration } = elements,
732
816
  node = typePrefixDeclarationNode, ///
733
817
  string = context.nodeAsString(node), ///
734
- typePrefix = typePrefixFromTypePrefixDeclarationNode(typePrefixDeclarationNode, context),
735
- typePrefixDeclaration = new TypePrefixDeclaration(context, string, node, typePrefix);
818
+ lineIndex = null,
819
+ typePrefix = typePrefixFromTypePrefixDeclarationNode(typePrefixDeclarationNode, context);
820
+
821
+ context = null;
822
+
823
+ const typePrefixDeclaration = new TypePrefixDeclaration(context, string, node, lineIndex, typePrefix);
736
824
 
737
825
  return typePrefixDeclaration;
738
826
  }
@@ -741,8 +829,12 @@ export function combinatorDeclarationFromCombinatorDeclarationNode(combinatorDec
741
829
  const { CombinatorDeclaration } = elements,
742
830
  node = combinatorDeclarationNode, ///
743
831
  string = context.nodeAsString(node),
744
- combinator = combinatorFromCombinatorDeclarationNode(combinatorDeclarationNode, context),
745
- combinatorDeclaration = new CombinatorDeclaration(context, string, node, combinator);
832
+ lineIndex = null,
833
+ combinator = combinatorFromCombinatorDeclarationNode(combinatorDeclarationNode, context);
834
+
835
+ context = null;
836
+
837
+ const combinatorDeclaration = new CombinatorDeclaration(context, string, node, lineIndex, combinator);
746
838
 
747
839
  return combinatorDeclaration;
748
840
  }
@@ -751,10 +843,14 @@ export function simpleTypeDeclarationFromSimpleTypeDeclarationNode(simpleTypeDec
751
843
  const { SimpleTypeDeclaration } = elements,
752
844
  node = simpleTypeDeclarationNode, ///
753
845
  string = context.nodeAsString(node),
846
+ lineIndex = null,
754
847
  type = typeFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
755
848
  superTypes = superTypesFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
756
- provisional = provisionalFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
757
- simpleTypeDeclaration = new SimpleTypeDeclaration(context, string, node, type, superTypes, provisional);
849
+ provisional = provisionalFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context);
850
+
851
+ context = null;
852
+
853
+ const simpleTypeDeclaration = new SimpleTypeDeclaration(context, string, node, lineIndex, type, superTypes, provisional);
758
854
 
759
855
  return simpleTypeDeclaration;
760
856
  }
@@ -763,10 +859,11 @@ export function referenceSubstitutionFromReferenceSubstitutionNode(referenceSubs
763
859
  const { ReferenceSubstitution } = elements,
764
860
  node = referenceSubstitutionNode, ///
765
861
  string = context.nodeAsString(node),
862
+ lineIndex = null,
766
863
  generalContext = generalContextFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
767
864
  targetReference = targetReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
768
865
  replacementReference = replacementReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
769
- referenceSubstitution = new ReferenceSubstitution(context, string, node, generalContext, targetReference, replacementReference);
866
+ referenceSubstitution = new ReferenceSubstitution(context, string, node, lineIndex, generalContext, targetReference, replacementReference);
770
867
 
771
868
  return referenceSubstitution;
772
869
  }
@@ -776,12 +873,13 @@ export function statementSubstitutionFromStatementSubstitutionNode(statementSubs
776
873
  const { StatementSubstitution } = elements,
777
874
  node = statementSubstitutionNode, ///
778
875
  string = context.nodeAsString(node),
876
+ lineIndex = null,
779
877
  generalContext = generalContextFromStatementSubstitutionNode(statementSubstitutionNode, context),
780
878
  resolved = resolvedFromStatementSubstitutionNode(statementSubstitutionNode, context),
781
879
  substitution = substitutionFromStatementSubstitutionNode(statementSubstitutionNode, context),
782
880
  targetStatement = targetStatementFromStatementSubstitutionNode(statementSubstitutionNode, context),
783
881
  replacementStatement = replacementStatementFromStatementSubstitutionNode(statementSubstitutionNode, context),
784
- statementSubstitution = new StatementSubstitution(context, string, node, generalContext, resolved, substitution, targetStatement, replacementStatement);
882
+ statementSubstitution = new StatementSubstitution(context, string, node, lineIndex, generalContext, resolved, substitution, targetStatement, replacementStatement);
785
883
 
786
884
  return statementSubstitution;
787
885
  }
@@ -790,10 +888,14 @@ export function constructorDeclarationFromConstructorDeclarationNode(constructor
790
888
  const { ConstructorDeclaration } = elements,
791
889
  node = constructorDeclarationNode, ///
792
890
  string = context.nodeAsString(node),
891
+ lineIndex = null,
793
892
  type = typeFromConstructorDeclarationNode(constructorDeclarationNode, context),
794
893
  provisional = provisionalFromConstructorDeclarationNode(constructorDeclarationNode, context),
795
- constructor = constructorFromConstructorDeclarationNode(constructorDeclarationNode, context),
796
- constructorDeclaration = new ConstructorDeclaration(context, string, node, type, provisional, constructor);
894
+ constructor = constructorFromConstructorDeclarationNode(constructorDeclarationNode, context);
895
+
896
+ context = null;
897
+
898
+ const constructorDeclaration = new ConstructorDeclaration(context, string, node, lineIndex, type, provisional, constructor);
797
899
 
798
900
  return constructorDeclaration;
799
901
  }
@@ -802,10 +904,14 @@ export function complexTypeDeclarationFromComplexTypeDeclarationNode(complexType
802
904
  const { ComplexTypeDeclaration } = elements,
803
905
  node = complexTypeDeclarationNode, ///
804
906
  string = context.nodeAsString(node),
907
+ lineIndex = null,
805
908
  type = typeFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
806
909
  superTypes = superTypesFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
807
- provisional = provisionalFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
808
- complexTypeDeclaration = new ComplexTypeDeclaration(context, string, node, type, superTypes, provisional);
910
+ provisional = provisionalFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context);
911
+
912
+ context = null;
913
+
914
+ const complexTypeDeclaration = new ComplexTypeDeclaration(context, string, node, lineIndex, type, superTypes, provisional);
809
915
 
810
916
  return complexTypeDeclaration;
811
917
  }
@@ -814,9 +920,13 @@ export function metavariableDeclarationFromMetavariableDeclarationNode(metavaria
814
920
  const { MetavariableDeclaration } = elements,
815
921
  node = metavariableDeclarationNode, ///
816
922
  string = context.nodeAsString(node),
923
+ lineIndex = null,
817
924
  metaType = metaTypeFromMetavariableDeclarationNode(metavariableDeclarationNode, context),
818
- metavariable = metavariableFromMetavariableDeclarationNode(metavariableDeclarationNode, context),
819
- metavariableDeclaration = new MetavariableDeclaration(context, string, node, metaType, metavariable);
925
+ metavariable = metavariableFromMetavariableDeclarationNode(metavariableDeclarationNode, context);
926
+
927
+ context = null;
928
+
929
+ const metavariableDeclaration = new MetavariableDeclaration(context, string, node, lineIndex, metaType, metavariable);
820
930
 
821
931
  return metavariableDeclaration;
822
932
  }