occam-verify-cli 0.0.442 → 0.0.444
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/action/verify.js +23 -10
- package/bin/callbacks.js +1 -1
- package/lib/axiom.js +18 -22
- package/lib/combinator.js +3 -3
- package/lib/conclusion.js +3 -7
- package/lib/constructor.js +11 -5
- package/lib/context/file.js +21 -21
- package/lib/context/release/file.js +22 -28
- package/lib/context/release.js +20 -1
- package/lib/label.js +3 -7
- package/lib/premise.js +3 -7
- package/lib/rule.js +20 -33
- package/lib/type.js +11 -4
- package/package.json +1 -1
- package/src/axiom.js +23 -24
- package/src/combinator.js +3 -2
- package/src/conclusion.js +5 -9
- package/src/constructor.js +18 -6
- package/src/context/file.js +23 -23
- package/src/context/release/file.js +25 -33
- package/src/context/release.js +20 -0
- package/src/label.js +3 -8
- package/src/premise.js +5 -9
- package/src/rule.js +22 -32
- package/src/type.js +16 -3
package/src/axiom.js
CHANGED
|
@@ -71,43 +71,38 @@ export default class Axiom {
|
|
|
71
71
|
return json;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
static fromJSON(json,
|
|
75
|
-
let axiom = null;
|
|
76
|
-
|
|
74
|
+
static fromJSON(json, releaseContext) {
|
|
77
75
|
let { labels } = json;
|
|
78
76
|
|
|
79
|
-
const
|
|
77
|
+
const labelsJSON = labels; ///
|
|
80
78
|
|
|
81
|
-
labels =
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
labels = labelsJSON.map((labelJSON) => {
|
|
80
|
+
const json = labelJSON, ///
|
|
81
|
+
label = Label.fromJSON(json, releaseContext);
|
|
84
82
|
|
|
85
|
-
|
|
83
|
+
return label;
|
|
84
|
+
});
|
|
86
85
|
|
|
87
|
-
|
|
88
|
-
labels.push(label);
|
|
89
|
-
} else {
|
|
90
|
-
labels = null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
86
|
+
const { statement, consequent, supposition } = json;
|
|
93
87
|
|
|
94
|
-
|
|
95
|
-
}, []);
|
|
88
|
+
let axiom;
|
|
96
89
|
|
|
97
|
-
if (
|
|
90
|
+
if (false) {
|
|
91
|
+
///
|
|
92
|
+
} else if (statement !== null) {
|
|
98
93
|
const ruleName = UNQUALIFIED_STATEMENT_RULE_NAME,
|
|
99
94
|
content = `${statement}
|
|
100
95
|
`,
|
|
101
|
-
|
|
96
|
+
node = releaseContext.nodeFromContentAndRuleName(content, ruleName),
|
|
97
|
+
unqualifiedStatementNode = node, ///
|
|
102
98
|
statementNode = statementNodeQuery(unqualifiedStatementNode),
|
|
103
99
|
consequentNode = null,
|
|
104
100
|
suppositionNode = null;
|
|
105
101
|
|
|
106
102
|
axiom = new Axiom(labels, statementNode, consequentNode, suppositionNode);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
let content,
|
|
103
|
+
} else if ((consequent !== null) && (supposition !== null)) {
|
|
104
|
+
let node,
|
|
105
|
+
content,
|
|
111
106
|
statementNode,
|
|
112
107
|
unqualifiedStatementNode;
|
|
113
108
|
|
|
@@ -116,7 +111,9 @@ export default class Axiom {
|
|
|
116
111
|
content = `${consequent}
|
|
117
112
|
`;
|
|
118
113
|
|
|
119
|
-
|
|
114
|
+
node = releaseContext.nodeFromContentAndRuleName(content, ruleName);
|
|
115
|
+
|
|
116
|
+
unqualifiedStatementNode = node; ///
|
|
120
117
|
|
|
121
118
|
statementNode = statementNodeQuery(unqualifiedStatementNode);
|
|
122
119
|
|
|
@@ -125,7 +122,9 @@ export default class Axiom {
|
|
|
125
122
|
content = `${supposition}
|
|
126
123
|
`;
|
|
127
124
|
|
|
128
|
-
|
|
125
|
+
node = releaseContext.nodeFromContentAndRuleName(content, ruleName);
|
|
126
|
+
|
|
127
|
+
unqualifiedStatementNode = node; ///
|
|
129
128
|
|
|
130
129
|
statementNode = statementNodeQuery(unqualifiedStatementNode);
|
|
131
130
|
|
package/src/combinator.js
CHANGED
|
@@ -34,12 +34,13 @@ export default class Combinator {
|
|
|
34
34
|
return json;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
static fromJSON(json,
|
|
37
|
+
static fromJSON(json, releaseContext) {
|
|
38
38
|
const { statement } = json,
|
|
39
39
|
ruleName = COMBINATOR_DECLARATION_RULE_NAME,
|
|
40
40
|
content = `Combinator ${statement}
|
|
41
41
|
`,
|
|
42
|
-
|
|
42
|
+
node = releaseContext.nodeFromContentAndRuleName(content, ruleName),
|
|
43
|
+
combinatorDeclarationNode = node, ///
|
|
43
44
|
statementNode = statementNodeQuery(combinatorDeclarationNode),
|
|
44
45
|
combinator = new Combinator(statementNode);
|
|
45
46
|
|
package/src/conclusion.js
CHANGED
|
@@ -36,19 +36,15 @@ export default class Conclusion {
|
|
|
36
36
|
return json;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
static fromJSON(json,
|
|
40
|
-
let conclusion = null;
|
|
41
|
-
|
|
39
|
+
static fromJSON(json, releaseContext) {
|
|
42
40
|
const { metastatement } = json,
|
|
43
41
|
ruleName = UNQUALIFIED_METASTATEMENT_RULE_NAME,
|
|
44
42
|
content = `${metastatement}
|
|
45
43
|
`,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
conclusion = new Conclusion(metastatementNode);
|
|
51
|
-
}
|
|
44
|
+
node = releaseContext.nodeFromContentAndRuleName(content, ruleName),
|
|
45
|
+
unqualifiedMetastatementNode = node, ///
|
|
46
|
+
metastatementNode = metastatementNodeQuery(unqualifiedMetastatementNode),
|
|
47
|
+
conclusion = new Conclusion(metastatementNode);
|
|
52
48
|
|
|
53
49
|
return conclusion;
|
|
54
50
|
}
|
package/src/constructor.js
CHANGED
|
@@ -57,19 +57,31 @@ export default class Constructor {
|
|
|
57
57
|
return json;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
static fromJSON(json,
|
|
61
|
-
let { type } = json;
|
|
62
|
-
|
|
60
|
+
static fromJSON(json, releaseContext) {
|
|
63
61
|
const { term } = json,
|
|
64
62
|
ruleName = CONSTRUCTOR_DECLARATION_RULE_NAME,
|
|
65
63
|
content = `Constructor ${term}
|
|
66
64
|
`,
|
|
67
|
-
|
|
65
|
+
node = releaseContext.nodeFromContentAndRuleName(content, ruleName),
|
|
66
|
+
constructorDeclarationNode = node, ///
|
|
68
67
|
termNode = statementNodeQuery(constructorDeclarationNode);
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
let { type } = json;
|
|
70
|
+
|
|
71
|
+
const typeJSON = type; ///
|
|
72
|
+
|
|
73
|
+
json = typeJSON; ///
|
|
74
|
+
|
|
75
|
+
type = Type.fromJSON(json, releaseContext);
|
|
76
|
+
|
|
77
|
+
const typeName = type.getName(),
|
|
78
|
+
typePresent = releaseContext.isTypePresentByTypeName(typeName);
|
|
79
|
+
|
|
80
|
+
if (!typePresent) {
|
|
81
|
+
throw new Error(`The '${content}' constructor cannot be instantiated because its '${typeName} is not present.'`);
|
|
82
|
+
}
|
|
71
83
|
|
|
72
|
-
type =
|
|
84
|
+
type = releaseContext.findTypeByTypeName(typeName); ///
|
|
73
85
|
|
|
74
86
|
const constructor = new Constructor(termNode, type);
|
|
75
87
|
|
package/src/context/file.js
CHANGED
|
@@ -6,13 +6,13 @@ import { push } from "../utilities/array";
|
|
|
6
6
|
import { leastLineIndexFromNodeAndTokens, greatestLineIndexFromNodeAndTokens } from "../utilities/tokens";
|
|
7
7
|
|
|
8
8
|
export default class FileContext {
|
|
9
|
-
constructor(releaseContext, filePath, tokens, node,
|
|
9
|
+
constructor(releaseContext, filePath, tokens, node, types, rules, axioms, variables, combinators, constructors) {
|
|
10
10
|
this.releaseContext = releaseContext;
|
|
11
11
|
this.filePath = filePath;
|
|
12
12
|
this.tokens = tokens;
|
|
13
13
|
this.node = node;
|
|
14
|
-
this.rules = rules;
|
|
15
14
|
this.types = types;
|
|
15
|
+
this.rules = rules;
|
|
16
16
|
this.axioms = axioms;
|
|
17
17
|
this.variables = variables;
|
|
18
18
|
this.combinators = combinators;
|
|
@@ -63,32 +63,32 @@ export default class FileContext {
|
|
|
63
63
|
return labels;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
const
|
|
66
|
+
getTypes(includeRelease = true) {
|
|
67
|
+
const types = [];
|
|
68
68
|
|
|
69
|
-
push(
|
|
69
|
+
push(types, this.types);
|
|
70
70
|
|
|
71
71
|
if (includeRelease) {
|
|
72
|
-
const
|
|
72
|
+
const releaseContextTypes = this.releaseContext.getTypes();
|
|
73
73
|
|
|
74
|
-
push(
|
|
74
|
+
push(types, releaseContextTypes);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
return
|
|
77
|
+
return types;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
const
|
|
80
|
+
getRules(includeRelease = true) {
|
|
81
|
+
const rules = []
|
|
82
82
|
|
|
83
|
-
push(
|
|
83
|
+
push(rules, this.rules);
|
|
84
84
|
|
|
85
85
|
if (includeRelease) {
|
|
86
|
-
const
|
|
86
|
+
const releaseContextRules = this.releaseContext.getRules();
|
|
87
87
|
|
|
88
|
-
push(
|
|
88
|
+
push(rules, releaseContextRules);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
return
|
|
91
|
+
return rules;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
getAxioms(includeRelease = true) {
|
|
@@ -295,18 +295,18 @@ export default class FileContext {
|
|
|
295
295
|
toJSON() {
|
|
296
296
|
const json = [];
|
|
297
297
|
|
|
298
|
-
this.rules.forEach((rule) => {
|
|
299
|
-
const ruleJSON = rule.toJSON();
|
|
300
|
-
|
|
301
|
-
json.push(ruleJSON);
|
|
302
|
-
});
|
|
303
|
-
|
|
304
298
|
this.types.forEach((type) => {
|
|
305
299
|
const typeJSON = type.toJSON();
|
|
306
300
|
|
|
307
301
|
json.push(typeJSON);
|
|
308
302
|
});
|
|
309
303
|
|
|
304
|
+
this.rules.forEach((rule) => {
|
|
305
|
+
const ruleJSON = rule.toJSON();
|
|
306
|
+
|
|
307
|
+
json.push(ruleJSON);
|
|
308
|
+
});
|
|
309
|
+
|
|
310
310
|
this.axioms.forEach((axiom) => {
|
|
311
311
|
const axiomJSON = axiom.toJSON();
|
|
312
312
|
|
|
@@ -336,13 +336,13 @@ export default class FileContext {
|
|
|
336
336
|
|
|
337
337
|
rewriteNodes(node);
|
|
338
338
|
|
|
339
|
-
const
|
|
340
|
-
|
|
339
|
+
const types = [],
|
|
340
|
+
rules = [],
|
|
341
341
|
axioms = [],
|
|
342
342
|
variables = [],
|
|
343
343
|
combinators = [],
|
|
344
344
|
constructors = [],
|
|
345
|
-
fileContext = new FileContext(releaseContext, filePath, tokens, node,
|
|
345
|
+
fileContext = new FileContext(releaseContext, filePath, tokens, node, types, rules, axioms, variables, combinators, constructors);
|
|
346
346
|
|
|
347
347
|
return fileContext;
|
|
348
348
|
}
|
|
@@ -154,73 +154,65 @@ export default class FileReleaseContext extends ReleaseContext {
|
|
|
154
154
|
return constructors;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
nodeFromContentAndRuleName(content, ruleName) {
|
|
158
|
+
const ruleMap = this.florenceParser.getRuleMap(),
|
|
159
|
+
rule = ruleMap[ruleName],
|
|
160
|
+
tokens = this.florenceLexer.tokenise(content),
|
|
161
|
+
node = this.florenceParser.parse(tokens, rule);
|
|
162
|
+
|
|
163
|
+
if (node !== null) {
|
|
164
|
+
rewriteNodes(node);
|
|
165
|
+
}
|
|
159
166
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const ruleMap = this.florenceParser.getRuleMap(),
|
|
163
|
-
tokens = this.florenceLexer.tokenise(content),
|
|
164
|
-
rule = ruleMap[ruleName],
|
|
165
|
-
node = this.florenceParser.parse(tokens, rule);
|
|
167
|
+
return node;
|
|
168
|
+
}
|
|
166
169
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
+
initialise(dependencyReleaseContexts) {
|
|
171
|
+
super.initialise(dependencyReleaseContexts);
|
|
170
172
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
const jsonArray = this.contextJSON,
|
|
174
|
+
releaseContext = this; ///
|
|
173
175
|
|
|
174
176
|
jsonArray.forEach((json) => {
|
|
175
177
|
const { kind } = json;
|
|
176
178
|
|
|
177
179
|
switch (kind) {
|
|
178
180
|
case TYPE_KIND: {
|
|
179
|
-
const type = Type.fromJSON(json);
|
|
181
|
+
const type = Type.fromJSON(json, releaseContext);
|
|
180
182
|
|
|
181
|
-
|
|
182
|
-
this.types.push(type);
|
|
183
|
-
}
|
|
183
|
+
this.types.push(type);
|
|
184
184
|
|
|
185
185
|
break;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
case RULE_KIND: {
|
|
189
|
-
const rule = Rule.fromJSON(json,
|
|
189
|
+
const rule = Rule.fromJSON(json, releaseContext);
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
this.rules.push(rule);
|
|
193
|
-
}
|
|
191
|
+
this.rules.push(rule);
|
|
194
192
|
|
|
195
193
|
break;
|
|
196
194
|
}
|
|
197
195
|
|
|
198
196
|
case AXIOM_KIND: {
|
|
199
|
-
const axiom = Axiom.fromJSON(json,
|
|
197
|
+
const axiom = Axiom.fromJSON(json, releaseContext);
|
|
200
198
|
|
|
201
|
-
|
|
202
|
-
this.axioms.push(axiom);
|
|
203
|
-
}
|
|
199
|
+
this.axioms.push(axiom);
|
|
204
200
|
|
|
205
201
|
break;
|
|
206
202
|
}
|
|
207
203
|
|
|
208
204
|
case COMBINATOR_KIND: {
|
|
209
|
-
const combinator = Combinator.fromJSON(json,
|
|
205
|
+
const combinator = Combinator.fromJSON(json, releaseContext);
|
|
210
206
|
|
|
211
|
-
|
|
212
|
-
this.combinators.push(combinator);
|
|
213
|
-
}
|
|
207
|
+
this.combinators.push(combinator);
|
|
214
208
|
|
|
215
209
|
break;
|
|
216
210
|
}
|
|
217
211
|
|
|
218
212
|
case CONSTRUCTOR_KIND: {
|
|
219
|
-
const constructor = Constructor.fromJSON(json,
|
|
213
|
+
const constructor = Constructor.fromJSON(json, releaseContext);
|
|
220
214
|
|
|
221
|
-
|
|
222
|
-
this.constructors.push(constructor);
|
|
223
|
-
}
|
|
215
|
+
this.constructors.push(constructor);
|
|
224
216
|
|
|
225
217
|
break;
|
|
226
218
|
}
|
package/src/context/release.js
CHANGED
|
@@ -56,6 +56,26 @@ export default class ReleaseContext {
|
|
|
56
56
|
return this.dependencyReleaseContexts;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
findTypeByTypeName(typeName) {
|
|
60
|
+
const types = this.getTypes(),
|
|
61
|
+
type = types.find((type) => {
|
|
62
|
+
const matches = type.matchTypeName(typeName);
|
|
63
|
+
|
|
64
|
+
if (matches) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
}) || null;
|
|
68
|
+
|
|
69
|
+
return type;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
isTypePresentByTypeName(typeName) {
|
|
73
|
+
const type = this.findTypeByTypeName(typeName),
|
|
74
|
+
typePresent = (type !== null);
|
|
75
|
+
|
|
76
|
+
return typePresent;
|
|
77
|
+
}
|
|
78
|
+
|
|
59
79
|
getReleaseName() {
|
|
60
80
|
const name = this.getName(),
|
|
61
81
|
releaseName = name; ///
|
package/src/label.js
CHANGED
|
@@ -34,16 +34,11 @@ export default class Label {
|
|
|
34
34
|
return json;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
static fromJSON(json,
|
|
38
|
-
let label = null;
|
|
39
|
-
|
|
37
|
+
static fromJSON(json, releaseContext) {
|
|
40
38
|
const content = json, ///
|
|
41
39
|
ruleName = LABEL_RULE_NAME,
|
|
42
|
-
node =
|
|
43
|
-
|
|
44
|
-
if (node !== null) {
|
|
45
|
-
label = new Label(node);
|
|
46
|
-
}
|
|
40
|
+
node = releaseContext.nodeFromContentAndRuleName(content, ruleName),
|
|
41
|
+
label = new Label(node);
|
|
47
42
|
|
|
48
43
|
return label;
|
|
49
44
|
}
|
package/src/premise.js
CHANGED
|
@@ -71,19 +71,15 @@ export default class Premise {
|
|
|
71
71
|
return json;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
static fromJSON(json,
|
|
75
|
-
let premise = null;
|
|
76
|
-
|
|
74
|
+
static fromJSON(json, releaseContext) {
|
|
77
75
|
const { metastatement } = json,
|
|
78
76
|
ruleName = UNQUALIFIED_METASTATEMENT_RULE_NAME,
|
|
79
77
|
content = `${metastatement}
|
|
80
78
|
`,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
premise = new Premise(metastatementNode);
|
|
86
|
-
}
|
|
79
|
+
node = releaseContext.nodeFromContentAndRuleName(content, ruleName),
|
|
80
|
+
unqualifiedMetastatementNode = node, ///
|
|
81
|
+
metastatementNode = metastatementNodeQuery(unqualifiedMetastatementNode),
|
|
82
|
+
premise = new Premise(metastatementNode);
|
|
87
83
|
|
|
88
84
|
return premise;
|
|
89
85
|
}
|
package/src/rule.js
CHANGED
|
@@ -91,50 +91,40 @@ export default class Rule {
|
|
|
91
91
|
return json;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
static fromJSON(json,
|
|
95
|
-
let rule
|
|
94
|
+
static fromJSON(json, releaseContext) {
|
|
95
|
+
let rule;
|
|
96
96
|
|
|
97
|
-
let { labels
|
|
97
|
+
let { labels } = json;
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
if (labels !== null) {
|
|
101
|
-
const json = label; ///
|
|
99
|
+
const labelsJSON = labels; ///
|
|
102
100
|
|
|
103
|
-
|
|
101
|
+
labels = labelsJSON.map((labelJSON) => {
|
|
102
|
+
const json = labelJSON, ///
|
|
103
|
+
label = Label.fromJSON(json, releaseContext);
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} else {
|
|
108
|
-
labels = null;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
105
|
+
return label;
|
|
106
|
+
});
|
|
111
107
|
|
|
112
|
-
|
|
113
|
-
}, []);
|
|
108
|
+
let { premises } = json;
|
|
114
109
|
|
|
115
|
-
|
|
116
|
-
if (premises !== null) {
|
|
117
|
-
const json = premise; ///
|
|
110
|
+
const premisesJSON = premises; ///
|
|
118
111
|
|
|
119
|
-
|
|
112
|
+
premises = premisesJSON.map((premiseJSON) => {
|
|
113
|
+
const json = premiseJSON, ///
|
|
114
|
+
premise = Premise.fromJSON(json, releaseContext);
|
|
120
115
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
} else {
|
|
124
|
-
premises = null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
116
|
+
return premise;
|
|
117
|
+
});
|
|
127
118
|
|
|
128
|
-
|
|
129
|
-
}, []);
|
|
119
|
+
let { conclusion } = json;
|
|
130
120
|
|
|
131
|
-
|
|
121
|
+
const conclusionJSON = conclusion; ///
|
|
132
122
|
|
|
133
|
-
|
|
123
|
+
json = conclusionJSON; ///
|
|
134
124
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
125
|
+
conclusion = Conclusion.fromJSON(json, releaseContext);
|
|
126
|
+
|
|
127
|
+
rule = new Rule(labels, premises, conclusion);
|
|
138
128
|
|
|
139
129
|
return rule;
|
|
140
130
|
}
|
package/src/type.js
CHANGED
|
@@ -119,15 +119,28 @@ export default class Type {
|
|
|
119
119
|
return json;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
static fromJSON(json) {
|
|
122
|
+
static fromJSON(json, releaseContext) {
|
|
123
123
|
const { name } = json;
|
|
124
124
|
|
|
125
125
|
let { superType } = json;
|
|
126
126
|
|
|
127
127
|
if (superType !== null) {
|
|
128
|
-
|
|
128
|
+
const superTypeJSON = superType; ///
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
json = superTypeJSON; ///
|
|
131
|
+
|
|
132
|
+
superType = Type.fromJSON(json, releaseContext);
|
|
133
|
+
|
|
134
|
+
const superTypeName = superType.getName(),
|
|
135
|
+
superTypePresent = releaseContext.isTypePresentByTypeName(superTypeName);
|
|
136
|
+
|
|
137
|
+
if (!superTypePresent) {
|
|
138
|
+
const typeName = name; ///
|
|
139
|
+
|
|
140
|
+
throw new Error(`The '${typeName}' type cannot be instantiated because its '${superTypeName}' super type is not present.`);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
superType = releaseContext.findTypeByTypeName(superTypeName); ///
|
|
131
144
|
}
|
|
132
145
|
|
|
133
146
|
const type = new Type(name, superType);
|