occam-furtle 3.0.39 → 3.0.41
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/lib/constants.js +1 -28
- package/lib/context/block.js +6 -7
- package/lib/context/file/furtle.js +6 -12
- package/lib/element/assignment/array.js +3 -3
- package/lib/element/assignment/object.js +3 -3
- package/lib/element/assignment/variable.js +3 -8
- package/lib/element/assignments/variable.js +5 -10
- package/lib/element/declaration/procedure.js +3 -8
- package/lib/element/error.js +3 -8
- package/lib/element/every.js +5 -5
- package/lib/element/expression.js +3 -8
- package/lib/element/label.js +3 -8
- package/lib/element/nodeQuery.js +3 -3
- package/lib/element/nodesQuery.js +3 -3
- package/lib/element/parameter/named.js +3 -3
- package/lib/element/parameter.js +3 -3
- package/lib/element/parameters/named.js +3 -3
- package/lib/element/parameters.js +3 -3
- package/lib/element/primitive.js +3 -3
- package/lib/element/procedure/anonymous.js +3 -3
- package/lib/element/procedure.js +3 -3
- package/lib/element/procedureCall.js +3 -3
- package/lib/element/reduce.js +5 -5
- package/lib/element/reference.js +3 -8
- package/lib/element/returnBlock.js +5 -5
- package/lib/element/some.js +5 -5
- package/lib/element/statement/return.js +3 -8
- package/lib/element/step.js +3 -8
- package/lib/element/term/bracketed.js +3 -8
- package/lib/element/term/comparison.js +3 -3
- package/lib/element/term/logical.js +3 -3
- package/lib/element/term/negated.js +3 -3
- package/lib/element/term.js +3 -8
- package/lib/element/terms.js +3 -8
- package/lib/element/ternary.js +3 -3
- package/lib/element/variable.js +3 -3
- package/lib/example/view.js +3 -4
- package/lib/furtle/parser.js +3 -3
- package/lib/index.js +7 -43
- package/lib/node/assignment.js +4 -9
- package/lib/node/assignments.js +4 -9
- package/lib/node/declaration.js +4 -9
- package/lib/node/document.js +4 -9
- package/lib/node/error.js +4 -9
- package/lib/node/every.js +4 -9
- package/lib/node/expression.js +4 -9
- package/lib/node/label.js +4 -9
- package/lib/node/nodeQuery.js +4 -9
- package/lib/node/nodesQuery.js +4 -9
- package/lib/node/nonsense.js +4 -9
- package/lib/node/parameter.js +4 -9
- package/lib/node/parameters.js +4 -9
- package/lib/node/primitive.js +4 -4
- package/lib/node/procedure.js +4 -9
- package/lib/node/procedureCall.js +4 -9
- package/lib/node/reduce.js +4 -9
- package/lib/node/reference.js +4 -9
- package/lib/node/returnBlock.js +4 -9
- package/lib/node/some.js +4 -9
- package/lib/node/statement.js +4 -9
- package/lib/node/step.js +4 -9
- package/lib/node/term.js +4 -9
- package/lib/node/terms.js +4 -9
- package/lib/node/ternary.js +4 -9
- package/lib/node/variable.js +4 -9
- package/lib/process/verify.js +5 -161
- package/package.json +7 -7
- package/src/constants.js +0 -12
- package/src/context/block.js +3 -4
- package/src/context/file/furtle.js +3 -4
- package/src/element/assignment/array.js +2 -1
- package/src/element/assignment/object.js +2 -1
- package/src/element/assignment/variable.js +1 -1
- package/src/element/assignments/variable.js +3 -3
- package/src/element/declaration/procedure.js +2 -2
- package/src/element/error.js +2 -2
- package/src/element/every.js +4 -2
- package/src/element/expression.js +1 -1
- package/src/element/label.js +1 -1
- package/src/element/nodeQuery.js +1 -1
- package/src/element/nodesQuery.js +2 -1
- package/src/element/parameter/named.js +2 -2
- package/src/element/parameter.js +2 -1
- package/src/element/parameters/named.js +2 -2
- package/src/element/parameters.js +2 -1
- package/src/element/primitive.js +1 -1
- package/src/element/procedure/anonymous.js +2 -1
- package/src/element/procedure.js +2 -1
- package/src/element/procedureCall.js +2 -1
- package/src/element/reduce.js +4 -2
- package/src/element/reference.js +1 -1
- package/src/element/returnBlock.js +4 -2
- package/src/element/some.js +4 -2
- package/src/element/statement/return.js +2 -2
- package/src/element/step.js +1 -1
- package/src/element/term/bracketed.js +2 -2
- package/src/element/term/comparison.js +2 -1
- package/src/element/term/logical.js +2 -1
- package/src/element/term/negated.js +2 -1
- package/src/element/term.js +1 -1
- package/src/element/terms.js +1 -1
- package/src/element/ternary.js +2 -1
- package/src/element/variable.js +2 -1
- package/src/example/view.js +1 -2
- package/src/furtle/parser.js +2 -1
- package/src/index.js +2 -11
- package/src/node/assignment.js +1 -1
- package/src/node/assignments.js +1 -1
- package/src/node/declaration.js +1 -1
- package/src/node/document.js +1 -1
- package/src/node/error.js +1 -1
- package/src/node/every.js +1 -1
- package/src/node/expression.js +1 -1
- package/src/node/label.js +1 -1
- package/src/node/nodeQuery.js +1 -1
- package/src/node/nodesQuery.js +1 -1
- package/src/node/nonsense.js +1 -1
- package/src/node/parameter.js +1 -1
- package/src/node/parameters.js +1 -1
- package/src/node/primitive.js +2 -1
- package/src/node/procedure.js +1 -1
- package/src/node/procedureCall.js +1 -1
- package/src/node/reduce.js +1 -1
- package/src/node/reference.js +1 -1
- package/src/node/returnBlock.js +1 -1
- package/src/node/some.js +1 -1
- package/src/node/statement.js +1 -1
- package/src/node/step.js +1 -1
- package/src/node/term.js +1 -1
- package/src/node/terms.js +1 -1
- package/src/node/ternary.js +1 -2
- package/src/node/variable.js +1 -1
- package/src/process/verify.js +2 -98
- package/{src → test}/context/file/nominal.js +5 -3
- package/test/file/furtle.js +14 -0
- package/test/file/nominal.js +15 -0
- package/test/helpers/nominal.js +32 -0
- package/lib/context/file/nominal.js +0 -272
- package/lib/context/file.js +0 -456
- package/lib/context/release.js +0 -446
- package/lib/context.js +0 -141
- package/lib/element.js +0 -207
- package/lib/log.js +0 -195
- package/lib/nonTerminalNode.js +0 -236
- package/lib/utilities/asynchronous.js +0 -458
- package/lib/utilities/context.js +0 -34
- package/lib/utilities/customGrammar.js +0 -55
- package/lib/utilities/lineIndex.js +0 -26
- package/lib/utilities/node.js +0 -78
- package/lib/utilities/nominal.js +0 -42
- package/lib/utilities/query.js +0 -43
- package/src/context/file.js +0 -149
- package/src/context/release.js +0 -222
- package/src/context.js +0 -42
- package/src/element.js +0 -27
- package/src/log.js +0 -132
- package/src/nonTerminalNode.js +0 -151
- package/src/utilities/asynchronous.js +0 -121
- package/src/utilities/context.js +0 -19
- package/src/utilities/customGrammar.js +0 -54
- package/src/utilities/lineIndex.js +0 -21
- package/src/utilities/node.js +0 -90
- package/src/utilities/nominal.js +0 -31
- package/src/utilities/query.js +0 -30
package/src/node/parameters.js
CHANGED
package/src/node/primitive.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { NonTerminalNode } from "occam-languages";
|
|
4
|
+
|
|
3
5
|
import nullNode from "../nullNode";
|
|
4
|
-
import NonTerminalNode from "../nonTerminalNode";
|
|
5
6
|
|
|
6
7
|
import { NULL, TRUE, FALSE } from "../constants";
|
|
7
8
|
import { NODE_TYPE, STRING_TYPE, NUMBER_TYPE, BOOLEAN_TYPE } from "../types";
|
package/src/node/procedure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import NonTerminalNode from "
|
|
3
|
+
import { NonTerminalNode } from "occam-languages";
|
|
4
4
|
|
|
5
5
|
export default class ProcedureNode extends NonTerminalNode {
|
|
6
6
|
static fromRuleNameChildNodesOpacityAndPrecedence(Class, ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(Class, ruleName, childNodes, opacity, precedence); }
|
package/src/node/reduce.js
CHANGED
package/src/node/reference.js
CHANGED
package/src/node/returnBlock.js
CHANGED
package/src/node/some.js
CHANGED
package/src/node/statement.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import NonTerminalNode from "
|
|
3
|
+
import { NonTerminalNode } from "occam-languages";
|
|
4
4
|
|
|
5
5
|
export default class StatementNode extends NonTerminalNode {
|
|
6
6
|
static fromRuleNameChildNodesOpacityAndPrecedence(Class, ruleName, childNodes, opacity, precedence) { return NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(Class, ruleName, childNodes, opacity, precedence); }
|
package/src/node/step.js
CHANGED
package/src/node/term.js
CHANGED
package/src/node/terms.js
CHANGED
package/src/node/ternary.js
CHANGED
package/src/node/variable.js
CHANGED
package/src/process/verify.js
CHANGED
|
@@ -1,110 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Pass, nodeUtilities } from "occam-languages";
|
|
4
4
|
|
|
5
5
|
import { errorFromErrorNode, procedureDeclarationFromProcedureDeclarationNode } from "../utilities/element";
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const { nodeQuery } = nodeUtilities;
|
|
8
8
|
|
|
9
9
|
const errorNodeQuery = nodeQuery("/error"),
|
|
10
10
|
procedureDeclarationNodeQuery = nodeQuery("/procedureDeclaration");
|
|
11
11
|
|
|
12
|
-
class Pass {
|
|
13
|
-
run(node, ...remainingArguments) {
|
|
14
|
-
let success;
|
|
15
|
-
|
|
16
|
-
const visited = this.visitNode(node, ...remainingArguments);
|
|
17
|
-
|
|
18
|
-
success = visited; ///
|
|
19
|
-
|
|
20
|
-
return success;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
descend(childNodes, ...remainingArguments) {
|
|
24
|
-
let descended = false;
|
|
25
|
-
|
|
26
|
-
const visited = childNodes.every((childNode) => {
|
|
27
|
-
const node = childNode, ///
|
|
28
|
-
visited = this.visitNode(node, ...remainingArguments);
|
|
29
|
-
|
|
30
|
-
if (visited) {
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
if (visited) {
|
|
36
|
-
descended = true;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return descended;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
visitNode(node, ...remainingArguments) {
|
|
43
|
-
let visited;
|
|
44
|
-
|
|
45
|
-
const nodeTerminalNode = node.isTerminalNode();
|
|
46
|
-
|
|
47
|
-
if (nodeTerminalNode) {
|
|
48
|
-
const terminalNode = node; ///
|
|
49
|
-
|
|
50
|
-
visited = this.visitTerminalNode(terminalNode, ...remainingArguments);
|
|
51
|
-
} else {
|
|
52
|
-
const nonTerminalNode = node; ///
|
|
53
|
-
|
|
54
|
-
visited = this.visitNonTerminalNode(nonTerminalNode, ...remainingArguments);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return visited;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
visitTerminalNode(terminalNode, ...remainingArguments) {
|
|
61
|
-
const visited = true;
|
|
62
|
-
|
|
63
|
-
return visited;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
visitNonTerminalNode(nonTerminalNode, ...remainingArguments) {
|
|
67
|
-
let visited = false;
|
|
68
|
-
|
|
69
|
-
let { maps } = this.constructor;
|
|
70
|
-
|
|
71
|
-
maps = [ ///
|
|
72
|
-
...maps,
|
|
73
|
-
{
|
|
74
|
-
nodeQuery: nonTerminalNodeQuery,
|
|
75
|
-
run: (node, ...remainingArguments) => {
|
|
76
|
-
let visited = false;
|
|
77
|
-
|
|
78
|
-
const childNodes = nonTerminalNode.getChildNodes(), ///
|
|
79
|
-
descended = this.descend(childNodes, ...remainingArguments);
|
|
80
|
-
|
|
81
|
-
if (descended) {
|
|
82
|
-
visited = true;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return visited;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
|
|
90
|
-
maps.some((map) => {
|
|
91
|
-
const { nodeQuery, run } = map;
|
|
92
|
-
|
|
93
|
-
const node = nodeQuery(nonTerminalNode);
|
|
94
|
-
|
|
95
|
-
if (node !== null) {
|
|
96
|
-
const success = run(node, ...remainingArguments);
|
|
97
|
-
|
|
98
|
-
visited = success;
|
|
99
|
-
|
|
100
|
-
return true;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
return visited;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
12
|
class TopLevelPass extends Pass {
|
|
109
13
|
static maps = [
|
|
110
14
|
{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const { FileContext, contextUtilities } = require("occam-languages");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const { chainContext } = contextUtilities;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
class NominalFileContext extends FileContext {
|
|
8
8
|
constructor(context, filePath, tokens, node) {
|
|
9
9
|
super(context, filePath, tokens, node);
|
|
10
10
|
|
|
@@ -37,3 +37,5 @@ export default class NominalFileContext extends FileContext {
|
|
|
37
37
|
return nominalFileContext;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
module.exports = NominalFileContext;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { File } = require("occam-model"),
|
|
4
|
+
{ FurtleFileContext } = require("../../lib/index"); ///
|
|
5
|
+
|
|
6
|
+
class FurtleFile extends File {
|
|
7
|
+
getFileContext() {
|
|
8
|
+
const FileContext = FurtleFileContext; ///
|
|
9
|
+
|
|
10
|
+
return FileContext;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = FurtleFile;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { File } = require("occam-model");
|
|
4
|
+
|
|
5
|
+
const NominalileContext = require("../context/file/nominal");
|
|
6
|
+
|
|
7
|
+
class Nominalile extends File {
|
|
8
|
+
getFileContext() {
|
|
9
|
+
const FileContext = NominalileContext; ///
|
|
10
|
+
|
|
11
|
+
return FileContext;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
module.exports = Nominalile;
|
package/test/helpers/nominal.js
CHANGED
|
@@ -12,6 +12,38 @@ function nominalFileFromNohting() {
|
|
|
12
12
|
return nominalFile;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
import { lexersUtilities, parsersUtilities } from "occam-nominal";
|
|
18
|
+
|
|
19
|
+
import { STATEMENT_RULE_NAME } from "../constants";
|
|
20
|
+
import { combinedCustomGrammarFromJSON } from "../utilities/customGrammar";
|
|
21
|
+
|
|
22
|
+
const { nominalLexerFromCombinedCustomGrammar } = lexersUtilities,
|
|
23
|
+
{ nominalParserFromStartRuleNameAndCombinedCustomGrammar } = parsersUtilities;
|
|
24
|
+
|
|
25
|
+
const startRuleName = STATEMENT_RULE_NAME,
|
|
26
|
+
combinedCustomGrammar = combinedCustomGrammarFromJSON([
|
|
27
|
+
{
|
|
28
|
+
"name": "Default",
|
|
29
|
+
"termBNF": "term ::= \"(\" argument \")\"\n\n | variable \n \n ;",
|
|
30
|
+
"statementBNF": "statement ::= \"(\" metaArgument \")\" \n \n | equality\n\n | judgement\n\n | typeAssertion \n \n | definedAssertion \n\n | containedAssertion \n \n | satisfiesAssertion\n\n | subproofAssertion \n\n | propertyAssertion \n\n | metavariable ( frameSubstitution | termSubstitution )?\n\n ;\n\nequality ::= term \"=\" term ;\n\ntypeAssertion ::= term \":\" type ;\n\ndefinedAssertion ::= ( frame | term ) \"is\" ( \"defined\" | \"undefined\" );\n\ncontainedAssertion ::= ( frame | term ) \"is\" ( \"present\" | \"missing\" ) \"in\" statement ;\n\nsatisfiesAssertion ::= signature \"satisfies\" metavariable ; \n\nsubproofAssertion ::= \"[\" statement ( \",\" statement )* \"]\" \"...\" statement ;\n\npropertyAssertion ::= term \"is\" ( \"a\" | \"an\" ) propertyRelation ;\n\npropertyRelation ::= property \"of\" term ;\n\njudgement ::= frame \"|\"<NO_WHITESPACE>\"-\" declaration ;\n\nframe ::= \"[\" declaration ( \",\" declaration )* \"]\" ;\n \ndeclaration ::= metavariable ( \"::\" statement )? ;\n\ntermSubstitution ::= \"[\" term \"for\" term \"]\";\n\nframeSubstitution ::= \"[\" frame \"for\" frame \"]\";\n\nstatementSubstitution ::= \"[\" statement \"for\" statement \"]\";\n\nreferenceSubstitution ::= \"[\" reference \"for\" reference \"]\";",
|
|
31
|
+
"typeVocabulary": "",
|
|
32
|
+
"symbolVocabulary": ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "first-order-logic",
|
|
36
|
+
"termBNF": "",
|
|
37
|
+
"statementBNF": "\n\n statement ::= ( \"∀\" | \"∃\" ) ( frameArgument | argument ) metaArgument \n\n | ( frameArgument | argument ) \"is\" ( \"𝘣𝘰𝘶𝘯𝘥\" | \"𝘧𝘳𝘦𝘦\" ) \"in\" metaArgument\n\n ;\n\n",
|
|
38
|
+
"typeVocabulary": "",
|
|
39
|
+
"symbolVocabulary": "𝘣𝘰𝘶𝘯𝘥\n𝘧𝘳𝘦𝘦\n∀\n∃\n"
|
|
40
|
+
}
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
export const nominalLexer = nominalLexerFromCombinedCustomGrammar(combinedCustomGrammar);
|
|
44
|
+
|
|
45
|
+
export const nominalParser = nominalParserFromStartRuleNameAndCombinedCustomGrammar(startRuleName, combinedCustomGrammar);
|
|
46
|
+
|
|
15
47
|
module.exports = {
|
|
16
48
|
nominalFileFromNohting
|
|
17
49
|
};
|
|
@@ -1,272 +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 NominalFileContext;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
var _file = /*#__PURE__*/ _interop_require_default(require("../../context/file"));
|
|
12
|
-
var _context = require("../../utilities/context");
|
|
13
|
-
function _assert_this_initialized(self) {
|
|
14
|
-
if (self === void 0) {
|
|
15
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
-
}
|
|
17
|
-
return self;
|
|
18
|
-
}
|
|
19
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
20
|
-
try {
|
|
21
|
-
var info = gen[key](arg);
|
|
22
|
-
var value = info.value;
|
|
23
|
-
} catch (error) {
|
|
24
|
-
reject(error);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (info.done) {
|
|
28
|
-
resolve(value);
|
|
29
|
-
} else {
|
|
30
|
-
Promise.resolve(value).then(_next, _throw);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function _async_to_generator(fn) {
|
|
34
|
-
return function() {
|
|
35
|
-
var self = this, args = arguments;
|
|
36
|
-
return new Promise(function(resolve, reject) {
|
|
37
|
-
var gen = fn.apply(self, args);
|
|
38
|
-
function _next(value) {
|
|
39
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
40
|
-
}
|
|
41
|
-
function _throw(err) {
|
|
42
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
43
|
-
}
|
|
44
|
-
_next(undefined);
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function _call_super(_this, derived, args) {
|
|
49
|
-
derived = _get_prototype_of(derived);
|
|
50
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
51
|
-
}
|
|
52
|
-
function _class_call_check(instance, Constructor) {
|
|
53
|
-
if (!(instance instanceof Constructor)) {
|
|
54
|
-
throw new TypeError("Cannot call a class as a function");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function _defineProperties(target, props) {
|
|
58
|
-
for(var i = 0; i < props.length; i++){
|
|
59
|
-
var descriptor = props[i];
|
|
60
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
61
|
-
descriptor.configurable = true;
|
|
62
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
63
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
67
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
68
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
69
|
-
return Constructor;
|
|
70
|
-
}
|
|
71
|
-
function _get_prototype_of(o) {
|
|
72
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
73
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
74
|
-
};
|
|
75
|
-
return _get_prototype_of(o);
|
|
76
|
-
}
|
|
77
|
-
function _inherits(subClass, superClass) {
|
|
78
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
79
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
80
|
-
}
|
|
81
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
82
|
-
constructor: {
|
|
83
|
-
value: subClass,
|
|
84
|
-
writable: true,
|
|
85
|
-
configurable: true
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
89
|
-
}
|
|
90
|
-
function _interop_require_default(obj) {
|
|
91
|
-
return obj && obj.__esModule ? obj : {
|
|
92
|
-
default: obj
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function _possible_constructor_return(self, call) {
|
|
96
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
97
|
-
return call;
|
|
98
|
-
}
|
|
99
|
-
return _assert_this_initialized(self);
|
|
100
|
-
}
|
|
101
|
-
function _set_prototype_of(o, p) {
|
|
102
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
103
|
-
o.__proto__ = p;
|
|
104
|
-
return o;
|
|
105
|
-
};
|
|
106
|
-
return _set_prototype_of(o, p);
|
|
107
|
-
}
|
|
108
|
-
function _type_of(obj) {
|
|
109
|
-
"@swc/helpers - typeof";
|
|
110
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
111
|
-
}
|
|
112
|
-
function _is_native_reflect_construct() {
|
|
113
|
-
try {
|
|
114
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
115
|
-
} catch (_) {}
|
|
116
|
-
return (_is_native_reflect_construct = function() {
|
|
117
|
-
return !!result;
|
|
118
|
-
})();
|
|
119
|
-
}
|
|
120
|
-
function _ts_generator(thisArg, body) {
|
|
121
|
-
var f, y, t, _ = {
|
|
122
|
-
label: 0,
|
|
123
|
-
sent: function() {
|
|
124
|
-
if (t[0] & 1) throw t[1];
|
|
125
|
-
return t[1];
|
|
126
|
-
},
|
|
127
|
-
trys: [],
|
|
128
|
-
ops: []
|
|
129
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
130
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
131
|
-
return this;
|
|
132
|
-
}), g;
|
|
133
|
-
function verb(n) {
|
|
134
|
-
return function(v) {
|
|
135
|
-
return step([
|
|
136
|
-
n,
|
|
137
|
-
v
|
|
138
|
-
]);
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
function step(op) {
|
|
142
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
143
|
-
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
144
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
145
|
-
if (y = 0, t) op = [
|
|
146
|
-
op[0] & 2,
|
|
147
|
-
t.value
|
|
148
|
-
];
|
|
149
|
-
switch(op[0]){
|
|
150
|
-
case 0:
|
|
151
|
-
case 1:
|
|
152
|
-
t = op;
|
|
153
|
-
break;
|
|
154
|
-
case 4:
|
|
155
|
-
_.label++;
|
|
156
|
-
return {
|
|
157
|
-
value: op[1],
|
|
158
|
-
done: false
|
|
159
|
-
};
|
|
160
|
-
case 5:
|
|
161
|
-
_.label++;
|
|
162
|
-
y = op[1];
|
|
163
|
-
op = [
|
|
164
|
-
0
|
|
165
|
-
];
|
|
166
|
-
continue;
|
|
167
|
-
case 7:
|
|
168
|
-
op = _.ops.pop();
|
|
169
|
-
_.trys.pop();
|
|
170
|
-
continue;
|
|
171
|
-
default:
|
|
172
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
173
|
-
_ = 0;
|
|
174
|
-
continue;
|
|
175
|
-
}
|
|
176
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
177
|
-
_.label = op[1];
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
181
|
-
_.label = t[1];
|
|
182
|
-
t = op;
|
|
183
|
-
break;
|
|
184
|
-
}
|
|
185
|
-
if (t && _.label < t[2]) {
|
|
186
|
-
_.label = t[2];
|
|
187
|
-
_.ops.push(op);
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
if (t[2]) _.ops.pop();
|
|
191
|
-
_.trys.pop();
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
op = body.call(thisArg, _);
|
|
195
|
-
} catch (e) {
|
|
196
|
-
op = [
|
|
197
|
-
6,
|
|
198
|
-
e
|
|
199
|
-
];
|
|
200
|
-
y = 0;
|
|
201
|
-
} finally{
|
|
202
|
-
f = t = 0;
|
|
203
|
-
}
|
|
204
|
-
if (op[0] & 5) throw op[1];
|
|
205
|
-
return {
|
|
206
|
-
value: op[0] ? op[1] : void 0,
|
|
207
|
-
done: true
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
var NominalFileContext = /*#__PURE__*/ function(FileContext) {
|
|
212
|
-
_inherits(NominalFileContext, FileContext);
|
|
213
|
-
function NominalFileContext(context, filePath, tokens, node) {
|
|
214
|
-
_class_call_check(this, NominalFileContext);
|
|
215
|
-
var _this;
|
|
216
|
-
_this = _call_super(this, NominalFileContext, [
|
|
217
|
-
context,
|
|
218
|
-
filePath,
|
|
219
|
-
tokens,
|
|
220
|
-
node
|
|
221
|
-
]);
|
|
222
|
-
return _possible_constructor_return(_this, (0, _context.chainContext)(_this));
|
|
223
|
-
}
|
|
224
|
-
_create_class(NominalFileContext, [
|
|
225
|
-
{
|
|
226
|
-
key: "getProcedures",
|
|
227
|
-
value: function getProcedures() {
|
|
228
|
-
var includeRelease = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
229
|
-
var procedures = [];
|
|
230
|
-
return procedures;
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
key: "clear",
|
|
235
|
-
value: function clear() {
|
|
236
|
-
///
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
key: "complete",
|
|
241
|
-
value: function complete() {
|
|
242
|
-
///
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
key: "verifyFile",
|
|
247
|
-
value: function verifyFile() {
|
|
248
|
-
return _async_to_generator(function() {
|
|
249
|
-
var fileVerifies;
|
|
250
|
-
return _ts_generator(this, function(_state) {
|
|
251
|
-
fileVerifies = true; ///
|
|
252
|
-
return [
|
|
253
|
-
2,
|
|
254
|
-
fileVerifies
|
|
255
|
-
];
|
|
256
|
-
});
|
|
257
|
-
})();
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
], [
|
|
261
|
-
{
|
|
262
|
-
key: "fromFile",
|
|
263
|
-
value: function fromFile(file, context) {
|
|
264
|
-
var nominalFileContext = _file.default.fromFile(NominalFileContext, file, context);
|
|
265
|
-
return nominalFileContext;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
]);
|
|
269
|
-
return NominalFileContext;
|
|
270
|
-
}(_file.default);
|
|
271
|
-
|
|
272
|
-
//# sourceMappingURL=data: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