@eagleoutice/flowr 1.3.14 → 1.4.1
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/abstract-interpretation/domain.d.ts +27 -0
- package/abstract-interpretation/domain.js +146 -0
- package/abstract-interpretation/handler/binop/binop.d.ts +16 -0
- package/abstract-interpretation/handler/binop/binop.js +40 -0
- package/abstract-interpretation/handler/binop/operators.d.ts +2 -0
- package/abstract-interpretation/handler/binop/operators.js +42 -0
- package/abstract-interpretation/handler/handler.d.ts +6 -0
- package/abstract-interpretation/handler/handler.js +3 -0
- package/abstract-interpretation/processor.d.ts +10 -0
- package/abstract-interpretation/processor.js +78 -0
- package/benchmark/slicer.d.ts +6 -5
- package/benchmark/slicer.js +2 -0
- package/benchmark/stats/print.d.ts +1 -1
- package/benchmark/stats/stats.d.ts +4 -4
- package/benchmark/stats/stats.js +1 -1
- package/cli/common/features.d.ts +1 -1
- package/cli/common/options.d.ts +1 -1
- package/cli/common/script.d.ts +1 -1
- package/cli/common/scripts-info.d.ts +2 -2
- package/cli/repl/commands/cfg.d.ts +1 -1
- package/cli/repl/commands/cfg.js +1 -1
- package/cli/repl/commands/commands.d.ts +1 -1
- package/cli/repl/commands/dataflow.d.ts +1 -1
- package/cli/repl/commands/execute.d.ts +2 -2
- package/cli/repl/commands/main.d.ts +2 -2
- package/cli/repl/commands/normalize.d.ts +1 -1
- package/cli/repl/commands/parse.d.ts +1 -1
- package/cli/repl/commands/quit.d.ts +1 -1
- package/cli/repl/commands/version.d.ts +1 -1
- package/cli/repl/core.d.ts +1 -1
- package/cli/repl/execute.d.ts +1 -1
- package/cli/repl/server/connection.d.ts +2 -2
- package/cli/repl/server/connection.js +3 -2
- package/cli/repl/server/messages/analysis.d.ts +3 -3
- package/cli/repl/server/messages/analysis.js +12 -32
- package/cli/repl/server/messages/error.d.ts +1 -1
- package/cli/repl/server/messages/hello.d.ts +2 -2
- package/cli/repl/server/messages/messages.d.ts +5 -5
- package/cli/repl/server/messages/repl.d.ts +1 -1
- package/cli/repl/server/messages/slice.d.ts +3 -3
- package/cli/repl/server/net.d.ts +16 -0
- package/cli/repl/server/net.js +40 -1
- package/cli/repl/server/send.d.ts +2 -2
- package/cli/repl/server/server.d.ts +2 -2
- package/cli/repl/server/validate.d.ts +3 -3
- package/cli/statistics-helper-app.js +2 -2
- package/core/input.d.ts +6 -6
- package/core/output.d.ts +3 -2
- package/core/print/dataflow-printer.d.ts +3 -3
- package/core/print/normalize-printer.d.ts +2 -2
- package/core/print/parse-printer.d.ts +2 -2
- package/core/print/print.d.ts +1 -1
- package/core/print/slice-diff-ansi.d.ts +1 -1
- package/core/slicer.d.ts +5 -4
- package/core/slicer.js +6 -2
- package/core/steps.d.ts +22 -4
- package/core/steps.js +10 -2
- package/dataflow/environments/append.d.ts +1 -1
- package/dataflow/environments/environment.d.ts +4 -4
- package/dataflow/environments/overwrite.d.ts +1 -1
- package/dataflow/environments/register.d.ts +2 -2
- package/dataflow/environments/resolve-by-name.d.ts +2 -2
- package/dataflow/environments/scoping.d.ts +1 -1
- package/dataflow/extractor.d.ts +4 -4
- package/dataflow/graph/diff.d.ts +3 -3
- package/dataflow/graph/graph.d.ts +8 -7
- package/dataflow/graph/quads.d.ts +2 -2
- package/dataflow/graph/vertex.d.ts +5 -5
- package/dataflow/internal/info.d.ts +2 -2
- package/dataflow/internal/linker.d.ts +3 -3
- package/dataflow/internal/process/access.d.ts +3 -3
- package/dataflow/internal/process/expression-list.d.ts +3 -3
- package/dataflow/internal/process/expression-list.js +0 -4
- package/dataflow/internal/process/functions/argument.d.ts +4 -4
- package/dataflow/internal/process/functions/exit-points.d.ts +1 -1
- package/dataflow/internal/process/functions/function-call.d.ts +3 -3
- package/dataflow/internal/process/functions/function-definition.d.ts +3 -3
- package/dataflow/internal/process/functions/parameter.d.ts +3 -3
- package/dataflow/internal/process/if-then-else.d.ts +3 -3
- package/dataflow/internal/process/loops/for-loop.d.ts +3 -3
- package/dataflow/internal/process/loops/repeat-loop.d.ts +3 -3
- package/dataflow/internal/process/loops/while-loop.d.ts +3 -3
- package/dataflow/internal/process/operators/assignment.d.ts +3 -3
- package/dataflow/internal/process/operators/non-assignment-binary-op.d.ts +3 -3
- package/dataflow/internal/process/operators/pipe.d.ts +3 -3
- package/dataflow/internal/process/operators/unary-op.d.ts +3 -3
- package/dataflow/internal/process/symbol.d.ts +3 -3
- package/dataflow/internal/process/uninteresting-leaf.d.ts +2 -2
- package/dataflow/processor.d.ts +3 -3
- package/flowr.d.ts +3 -2
- package/flowr.js +5 -3
- package/package.json +11 -2
- package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/model.d.ts +6 -6
- package/r-bridge/lang-4.x/ast/model/nodes/info/index.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/operators.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/model/processing/fold.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/xml/config.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/parser/xml/data.d.ts +5 -5
- package/r-bridge/lang-4.x/ast/parser/xml/hooks.d.ts +5 -5
- package/r-bridge/lang-4.x/ast/parser/xml/input-format.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/xml/internal/access.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then-else.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/expression/expression.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/argument.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/call.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/definition.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/parameter.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/break.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/for.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/next.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/repeat.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/while.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/meta.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/binary.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/special.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/unary.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/other/comment.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/other/line-directive.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/elements.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/root.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/single-element.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/parser/xml/internal/values/number.d.ts +4 -4
- package/r-bridge/lang-4.x/ast/parser/xml/internal/values/string.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/values/symbol.d.ts +3 -3
- package/r-bridge/lang-4.x/ast/parser/xml/internal/xml-to-json.d.ts +2 -2
- package/r-bridge/lang-4.x/ast/parser/xml/parser.d.ts +4 -4
- package/r-bridge/retriever.d.ts +2 -2
- package/r-bridge/shell-executor.d.ts +25 -0
- package/r-bridge/shell-executor.js +119 -0
- package/r-bridge/shell.d.ts +8 -5
- package/r-bridge/shell.js +6 -3
- package/reconstruct/reconstruct.d.ts +1 -1
- package/slicing/criterion/collect-all.d.ts +3 -3
- package/slicing/criterion/filters/all-variables.d.ts +1 -1
- package/slicing/criterion/parse.d.ts +1 -1
- package/slicing/static/static-slicer.d.ts +3 -3
- package/statistics/features/common-syntax-probability.d.ts +3 -2
- package/statistics/features/common-syntax-probability.js +0 -3
- package/statistics/features/feature.d.ts +6 -6
- package/statistics/features/post-processing.d.ts +2 -2
- package/statistics/features/supported/assignments/assignments.d.ts +2 -2
- package/statistics/features/supported/assignments/post-process.d.ts +2 -2
- package/statistics/features/supported/comments/comments.d.ts +2 -2
- package/statistics/features/supported/comments/post-process.d.ts +2 -2
- package/statistics/features/supported/control-flow/control-flow.d.ts +2 -2
- package/statistics/features/supported/control-flow/post-process.d.ts +2 -2
- package/statistics/features/supported/data-access/data-access.d.ts +3 -3
- package/statistics/features/supported/data-access/post-process.d.ts +2 -2
- package/statistics/features/supported/defined-functions/defined-functions.d.ts +4 -4
- package/statistics/features/supported/defined-functions/post-process.d.ts +2 -2
- package/statistics/features/supported/expression-list/expression-list.d.ts +2 -2
- package/statistics/features/supported/expression-list/post-process.d.ts +2 -2
- package/statistics/features/supported/loops/loops.d.ts +2 -2
- package/statistics/features/supported/loops/post-process.d.ts +2 -2
- package/statistics/features/supported/used-functions/post-process.d.ts +2 -2
- package/statistics/features/supported/used-functions/used-functions.d.ts +3 -3
- package/statistics/features/supported/used-packages/post-process.d.ts +2 -2
- package/statistics/features/supported/used-packages/used-packages.d.ts +2 -2
- package/statistics/features/supported/values/post-process.d.ts +2 -2
- package/statistics/features/supported/values/values.d.ts +2 -2
- package/statistics/features/supported/variables/post-process.d.ts +3 -3
- package/statistics/features/supported/variables/variables.d.ts +2 -2
- package/statistics/meta-statistics.d.ts +1 -1
- package/statistics/output/print-stats.d.ts +2 -2
- package/statistics/output/statistics-file.d.ts +1 -1
- package/statistics/statistics.d.ts +4 -4
- package/util/{cfg.d.ts → cfg/cfg.d.ts} +18 -6
- package/util/{cfg.js → cfg/cfg.js} +42 -37
- package/util/cfg/visitor.d.ts +14 -0
- package/util/cfg/visitor.js +64 -0
- package/util/diff.d.ts +1 -1
- package/util/files.d.ts +1 -1
- package/util/mermaid/ast.d.ts +1 -1
- package/util/mermaid/cfg.d.ts +2 -2
- package/util/mermaid/dfg.d.ts +3 -3
- package/util/objects.d.ts +1 -1
- package/util/quads.d.ts +2 -2
- package/util/summarizer/benchmark/data.d.ts +1 -1
- package/util/summarizer/benchmark/first-phase/process.d.ts +3 -3
- package/util/summarizer/benchmark/second-phase/graph.d.ts +1 -1
- package/util/summarizer/benchmark/second-phase/process.d.ts +1 -1
- package/util/summarizer/benchmark/summarizer.d.ts +3 -2
- package/util/summarizer/benchmark/summarizer.js +0 -4
- package/util/summarizer/statistics/post-process/clusterer.d.ts +2 -2
- package/util/summarizer/statistics/post-process/file-based-count.d.ts +1 -1
- package/util/summarizer/statistics/post-process/histogram.d.ts +2 -2
- package/util/summarizer/statistics/post-process/post-process-output.d.ts +2 -2
- package/util/summarizer/statistics/second-phase/process.d.ts +2 -2
- package/util/summarizer/statistics/summarizer.d.ts +3 -2
- package/util/summarizer/summarizer.d.ts +1 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processExpressionList = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Processes a list of expressions joining their dataflow graphs accordingly.
|
|
6
|
-
* @module
|
|
7
|
-
*/
|
|
8
4
|
const info_1 = require("../info");
|
|
9
5
|
const r_bridge_1 = require("../../../r-bridge");
|
|
10
6
|
const processor_1 = require("../../processor");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RArgument, RNode } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RArgument, RNode } from '../../../../r-bridge';
|
|
4
4
|
import { DataflowGraph } from '../../../graph';
|
|
5
|
-
import { IdentifierReference } from '../../../environments';
|
|
5
|
+
import type { IdentifierReference } from '../../../environments';
|
|
6
6
|
export declare const UnnamedArgumentPrefix = "unnamed-argument-";
|
|
7
7
|
export declare function linkReadsForArgument<OtherInfo>(root: RNode<OtherInfo & ParentInformation>, ingoingRefs: IdentifierReference[], graph: DataflowGraph): void;
|
|
8
8
|
export declare function processFunctionArgument<OtherInfo>(argument: RArgument<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeId, ParentInformation, RFunctionDefinition } from '../../../../r-bridge';
|
|
1
|
+
import type { NodeId, ParentInformation, RFunctionDefinition } from '../../../../r-bridge';
|
|
2
2
|
export declare function retrieveExitPointsOfFunctionDefinition<OtherInfo>(functionDefinition: RFunctionDefinition<OtherInfo & ParentInformation>): NodeId[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RFunctionCall } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RFunctionCall } from '../../../../r-bridge';
|
|
4
4
|
export declare const UnnamedFunctionCallPrefix = "unnamed-function-call-";
|
|
5
5
|
export declare function processFunctionCall<OtherInfo>(functionCall: RFunctionCall<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RFunctionDefinition } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RFunctionDefinition } from '../../../../r-bridge';
|
|
4
4
|
export declare function processFunctionDefinition<OtherInfo>(functionDefinition: RFunctionDefinition<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RParameter } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RParameter } from '../../../../r-bridge';
|
|
4
4
|
export declare function processFunctionParameter<OtherInfo>(parameter: RParameter<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../processor';
|
|
3
|
-
import { ParentInformation, RIfThenElse } from '../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../processor';
|
|
3
|
+
import type { ParentInformation, RIfThenElse } from '../../../r-bridge';
|
|
4
4
|
export declare function processIfThenElse<OtherInfo>(ifThen: RIfThenElse<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RForLoop } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RForLoop } from '../../../../r-bridge';
|
|
4
4
|
export declare function processForLoop<OtherInfo>(loop: RForLoop<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RRepeatLoop } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RRepeatLoop } from '../../../../r-bridge';
|
|
4
4
|
export declare function processRepeatLoop<OtherInfo>(loop: RRepeatLoop<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RWhileLoop } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RWhileLoop } from '../../../../r-bridge';
|
|
4
4
|
export declare function processWhileLoop<OtherInfo>(loop: RWhileLoop<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParentInformation, RAssignmentOp } from '../../../../r-bridge';
|
|
2
|
-
import { DataflowInformation } from '../../info';
|
|
3
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
1
|
+
import type { ParentInformation, RAssignmentOp } from '../../../../r-bridge';
|
|
2
|
+
import type { DataflowInformation } from '../../info';
|
|
3
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
4
4
|
export declare function processAssignment<OtherInfo>(op: RAssignmentOp<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RBinaryOp } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RBinaryOp } from '../../../../r-bridge';
|
|
4
4
|
export declare function processNonAssignmentBinaryOp<OtherInfo>(op: RBinaryOp<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RPipe } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RPipe } from '../../../../r-bridge';
|
|
4
4
|
export declare function processPipeOperation<OtherInfo>(op: RPipe<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataflowInformation } from '../../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
-
import { ParentInformation, RUnaryOp } from '../../../../r-bridge';
|
|
1
|
+
import type { DataflowInformation } from '../../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../../processor';
|
|
3
|
+
import type { ParentInformation, RUnaryOp } from '../../../../r-bridge';
|
|
4
4
|
export declare function processUnaryOp<OtherInfo>(op: RUnaryOp<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParentInformation, RSymbol } from '../../../r-bridge';
|
|
2
|
-
import { DataflowInformation } from '../info';
|
|
3
|
-
import { DataflowProcessorInformation } from '../../processor';
|
|
1
|
+
import type { ParentInformation, RSymbol } from '../../../r-bridge';
|
|
2
|
+
import type { DataflowInformation } from '../info';
|
|
3
|
+
import type { DataflowProcessorInformation } from '../../processor';
|
|
4
4
|
export declare function processSymbol<OtherInfo>(symbol: RSymbol<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo>): DataflowInformation;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DataflowInformation } from '../info';
|
|
2
|
-
import { DataflowProcessorInformation } from '../../processor';
|
|
1
|
+
import type { DataflowInformation } from '../info';
|
|
2
|
+
import type { DataflowProcessorInformation } from '../../processor';
|
|
3
3
|
export declare function processUninterestingLeaf<OtherInfo>(_leaf: unknown, info: DataflowProcessorInformation<OtherInfo>): DataflowInformation;
|
package/dataflow/processor.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Based on a two-way fold, this processor will automatically supply scope information
|
|
3
3
|
*/
|
|
4
|
-
import { NormalizedAst, ParentInformation, RNode, RNodeWithParent } from '../r-bridge';
|
|
5
|
-
import { DataflowInformation } from './internal/info';
|
|
6
|
-
import { DataflowScopeName, REnvironmentInformation } from './environments';
|
|
4
|
+
import type { NormalizedAst, ParentInformation, RNode, RNodeWithParent } from '../r-bridge';
|
|
5
|
+
import type { DataflowInformation } from './internal/info';
|
|
6
|
+
import type { DataflowScopeName, REnvironmentInformation } from './environments';
|
|
7
7
|
export interface DataflowProcessorInformation<OtherInfo> {
|
|
8
8
|
/**
|
|
9
9
|
* Initial and frozen ast-information
|
package/flowr.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { OptionDefinition } from 'command-line-usage';
|
|
2
2
|
export declare const toolName = "flowr";
|
|
3
3
|
export declare const optionDefinitions: OptionDefinition[];
|
|
4
4
|
export interface FlowrCliOptions {
|
|
@@ -6,6 +6,7 @@ export interface FlowrCliOptions {
|
|
|
6
6
|
version: boolean;
|
|
7
7
|
help: boolean;
|
|
8
8
|
server: boolean;
|
|
9
|
+
ws: boolean;
|
|
9
10
|
port: number;
|
|
10
11
|
'no-ansi': boolean;
|
|
11
12
|
execute: string | undefined;
|
|
@@ -21,6 +22,6 @@ export declare const optionHelp: ({
|
|
|
21
22
|
optionList?: undefined;
|
|
22
23
|
} | {
|
|
23
24
|
header: string;
|
|
24
|
-
optionList:
|
|
25
|
+
optionList: OptionDefinition[];
|
|
25
26
|
content?: undefined;
|
|
26
27
|
})[];
|
package/flowr.js
CHANGED
|
@@ -22,6 +22,7 @@ const package_json_1 = require("../package.json");
|
|
|
22
22
|
const version_1 = require("./cli/repl/commands/version");
|
|
23
23
|
const server_1 = require("./cli/repl/server/server");
|
|
24
24
|
const commands_1 = require("./cli/repl/commands");
|
|
25
|
+
const net_1 = require("./cli/repl/server/net");
|
|
25
26
|
const scriptsText = Array.from(Object.entries(common_1.scripts).filter(([, { type }]) => type === 'master script'), ([k,]) => k).join(', ');
|
|
26
27
|
exports.toolName = 'flowr';
|
|
27
28
|
exports.optionDefinitions = [
|
|
@@ -29,6 +30,7 @@ exports.optionDefinitions = [
|
|
|
29
30
|
{ name: 'help', alias: 'h', type: Boolean, description: 'Print this usage guide (or the guide of the corresponding script)' },
|
|
30
31
|
{ name: 'version', alias: 'V', type: Boolean, description: 'Provide information about the version of flowR as well as its underlying R system and exit.' },
|
|
31
32
|
{ name: 'server', type: Boolean, description: 'Do not drop into a repl, but instead start a server on the given port (default: 1042) and listen for messages.' },
|
|
33
|
+
{ name: 'ws', type: Boolean, description: 'If the server flag is set, use websocket for messaging' },
|
|
32
34
|
{ name: 'port', type: Number, description: 'The port to listen on, if --server is given.', defaultValue: 1042, typeLabel: '{underline port}' },
|
|
33
35
|
{ name: 'execute', alias: 'e', type: String, description: 'Execute the given command and exit. Use a semicolon ";" to separate multiple commands.', typeLabel: '{underline command}', multiple: false },
|
|
34
36
|
{ name: 'no-ansi', type: Boolean, description: 'Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.' },
|
|
@@ -112,7 +114,7 @@ async function mainRepl() {
|
|
|
112
114
|
}
|
|
113
115
|
process.exit(0);
|
|
114
116
|
}
|
|
115
|
-
async function mainServer() {
|
|
117
|
+
async function mainServer(backend = new net_1.NetServer()) {
|
|
116
118
|
const shell = await retrieveShell();
|
|
117
119
|
const end = () => {
|
|
118
120
|
if (options.execute === undefined) {
|
|
@@ -124,10 +126,10 @@ async function mainServer() {
|
|
|
124
126
|
// hook some handlers
|
|
125
127
|
process.on('SIGINT', end);
|
|
126
128
|
process.on('SIGTERM', end);
|
|
127
|
-
await new server_1.FlowRServer(shell).start(options.port);
|
|
129
|
+
await new server_1.FlowRServer(shell, backend).start(options.port);
|
|
128
130
|
}
|
|
129
131
|
if (options.server) {
|
|
130
|
-
void mainServer();
|
|
132
|
+
void mainServer(options.ws ? new net_1.WebSocketServerWrapper() : new net_1.NetServer());
|
|
131
133
|
}
|
|
132
134
|
else {
|
|
133
135
|
void mainRepl();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eagleoutice/flowr",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Static Dataflow Analyzer and Program Slicer for the R Programming Language",
|
|
5
5
|
"types": "dist/src/index.d.ts",
|
|
6
6
|
"repository": {
|
|
@@ -172,6 +172,12 @@
|
|
|
172
172
|
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
173
173
|
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
174
174
|
"@typescript-eslint/no-redundant-type-constituents": "off",
|
|
175
|
+
"@typescript-eslint/consistent-type-assertions": [
|
|
176
|
+
"error",
|
|
177
|
+
{
|
|
178
|
+
"assertionStyle": "as"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
175
181
|
"@typescript-eslint/key-spacing": [
|
|
176
182
|
"error",
|
|
177
183
|
{
|
|
@@ -288,7 +294,8 @@
|
|
|
288
294
|
"PascalCase"
|
|
289
295
|
]
|
|
290
296
|
}
|
|
291
|
-
]
|
|
297
|
+
],
|
|
298
|
+
"@typescript-eslint/consistent-type-imports": "error"
|
|
292
299
|
}
|
|
293
300
|
},
|
|
294
301
|
"release-it": {
|
|
@@ -363,6 +370,7 @@
|
|
|
363
370
|
"dependencies": {
|
|
364
371
|
"@types/semver": "^7.5.6",
|
|
365
372
|
"@types/tar": "^6.1.10",
|
|
373
|
+
"@types/ws": "^8.5.10",
|
|
366
374
|
"@xmldom/xmldom": "^0.8.10",
|
|
367
375
|
"command-line-args": "^5.2.1",
|
|
368
376
|
"command-line-usage": "^7.0.1",
|
|
@@ -377,6 +385,7 @@
|
|
|
377
385
|
"tmp": "^0.2.1",
|
|
378
386
|
"ts-essentials": "^9.4.1",
|
|
379
387
|
"tslog": "^4.9.2",
|
|
388
|
+
"ws": "^8.16.0",
|
|
380
389
|
"xml2js": "^0.6.2",
|
|
381
390
|
"xpath-ts2": "^1.4.2"
|
|
382
391
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NodeId, ParentInformation } from './processing';
|
|
2
|
-
import { RNode } from './model';
|
|
1
|
+
import type { NodeId, ParentInformation } from './processing';
|
|
2
|
+
import type { RNode } from './model';
|
|
3
3
|
/**
|
|
4
4
|
* Collects all node ids within a tree given by a respective root node
|
|
5
5
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SourceRange } from '../../../../util/range';
|
|
2
|
-
import { RType } from './type';
|
|
3
|
-
import { MergeableRecord } from '../../../../util/objects';
|
|
4
|
-
import { RNa, RNull } from '../../values';
|
|
5
|
-
import { RExpressionList, RNumber, RSymbol, RLogical, RString, RBinaryOp, RUnaryOp, RIfThenElse, RParameter, RFunctionDefinition, RRepeatLoop, RForLoop, RWhileLoop, RComment, RFunctionCall, RBreak, RNext, RArgument, RNamedAccess, RIndexAccess, RLineDirective, RPipe } from './nodes';
|
|
6
|
-
import { OtherInfoNode } from './nodes/info';
|
|
1
|
+
import type { SourceRange } from '../../../../util/range';
|
|
2
|
+
import type { RType } from './type';
|
|
3
|
+
import type { MergeableRecord } from '../../../../util/objects';
|
|
4
|
+
import type { RNa, RNull } from '../../values';
|
|
5
|
+
import type { RExpressionList, RNumber, RSymbol, RLogical, RString, RBinaryOp, RUnaryOp, RIfThenElse, RParameter, RFunctionDefinition, RRepeatLoop, RForLoop, RWhileLoop, RComment, RFunctionCall, RBreak, RNext, RArgument, RNamedAccess, RIndexAccess, RLineDirective, RPipe } from './nodes';
|
|
6
|
+
import type { OtherInfoNode } from './nodes/info';
|
|
7
7
|
/** Simply an empty interface used to say that there are additional decorations (see {@link Base}). */
|
|
8
8
|
export interface NoInfo {
|
|
9
9
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* In the future, they could be still integrated into the main ast.
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
import { RNode } from '../../model';
|
|
11
|
-
import { RDelimiter } from './r-delimiter';
|
|
10
|
+
import type { RNode } from '../../model';
|
|
11
|
+
import type { RDelimiter } from './r-delimiter';
|
|
12
12
|
export * from './r-delimiter';
|
|
13
13
|
export type OtherInfoNode = RNode | RDelimiter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RawRType, RType } from '../../type';
|
|
2
|
-
import { Location } from '../../model';
|
|
3
|
-
import { MergeableRecord } from '../../../../../../util/objects';
|
|
1
|
+
import type { RawRType, RType } from '../../type';
|
|
2
|
+
import type { Location } from '../../model';
|
|
3
|
+
import type { MergeableRecord } from '../../../../../../util/objects';
|
|
4
4
|
/**
|
|
5
5
|
* Combines '`{`', '`}`', '`(`', '`)`', and other delimiters used by R, they are ignored for most analysis
|
|
6
6
|
* but helpful during reconstruction.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RArgument } from './r-argument';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RArgument } from './r-argument';
|
|
4
4
|
/**
|
|
5
5
|
* Represents an R Indexing operation with `$`, `@`, `[[`, or `[`.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RSymbol } from './r-symbol';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RSymbol } from './r-symbol';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a named or unnamed argument of a function definition in R.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { BinaryOperatorFlavor } from '../operators';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { BinaryOperatorFlavor } from '../operators';
|
|
4
4
|
export interface RBinaryOp<Info = NoInfo> extends Base<Info>, Location {
|
|
5
5
|
readonly type: RType.BinaryOp;
|
|
6
6
|
readonly flavor: BinaryOperatorFlavor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Leaf, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
1
|
+
import type { Leaf, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
3
|
export interface RBreak<Info = NoInfo> extends Location, Leaf<Info> {
|
|
4
4
|
readonly type: RType.Break;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Leaf, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
1
|
+
import type { Leaf, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
3
|
export interface RComment<Info = NoInfo> extends Location, Leaf<Info> {
|
|
4
4
|
readonly type: RType.Comment;
|
|
5
5
|
content: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode, WithChildren } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode, WithChildren } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
3
|
export interface RExpressionList<Info = NoInfo> extends WithChildren<Info, RNode<Info>>, Base<Info, string | undefined>, Partial<Location> {
|
|
4
4
|
readonly type: RType.ExpressionList;
|
|
5
5
|
readonly content?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RSymbol } from './r-symbol';
|
|
4
|
-
import { RExpressionList } from './r-expression-list';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RSymbol } from './r-symbol';
|
|
4
|
+
import type { RExpressionList } from './r-expression-list';
|
|
5
5
|
/**
|
|
6
6
|
* ```ts
|
|
7
7
|
* for(<variable> in <vector>) <body>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RSymbol } from './r-symbol';
|
|
4
|
-
import { RArgument } from './r-argument';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RSymbol } from './r-symbol';
|
|
4
|
+
import type { RArgument } from './r-argument';
|
|
5
5
|
/**
|
|
6
6
|
* Calls of functions like `a()` and `foo(42, "hello")`.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Base, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RParameter } from './r-parameter';
|
|
4
|
-
import { RExpressionList } from './r-expression-list';
|
|
1
|
+
import type { Base, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RParameter } from './r-parameter';
|
|
4
|
+
import type { RExpressionList } from './r-expression-list';
|
|
5
5
|
export interface RFunctionDefinition<Info = NoInfo> extends Base<Info>, Location {
|
|
6
6
|
readonly type: RType.FunctionDefinition;
|
|
7
7
|
/** the R formals, to our knowledge they must be unique */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RExpressionList } from './r-expression-list';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RExpressionList } from './r-expression-list';
|
|
4
4
|
export interface RIfThenElse<Info = NoInfo> extends Base<Info>, Location {
|
|
5
5
|
readonly type: RType.IfThenElse;
|
|
6
6
|
condition: RNode<Info>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Leaf, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
1
|
+
import type { Leaf, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
3
|
export interface RLineDirective<Info = NoInfo> extends Location, Leaf<Info> {
|
|
4
4
|
readonly type: RType.LineDirective;
|
|
5
5
|
line: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Leaf, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
1
|
+
import type { Leaf, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
3
|
export type RLogicalValue = boolean;
|
|
4
4
|
export interface RLogical<Info = NoInfo> extends Leaf<Info>, Location {
|
|
5
5
|
readonly type: RType.Logical;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Leaf, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
1
|
+
import type { Leaf, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
3
|
export interface RNext<Info = NoInfo> extends Location, Leaf<Info> {
|
|
4
4
|
readonly type: RType.Next;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Leaf, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RNumberValue } from '../../../values';
|
|
1
|
+
import type { Leaf, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RNumberValue } from '../../../values';
|
|
4
4
|
/** includes numeric, integer, and complex */
|
|
5
5
|
export interface RNumber<Info = NoInfo> extends Leaf<Info>, Location {
|
|
6
6
|
readonly type: RType.Number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RSymbol } from './r-symbol';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RSymbol } from './r-symbol';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a parameter of a function definition in R.
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
3
|
export interface RPipe<Info = NoInfo> extends Base<Info>, Location {
|
|
4
4
|
readonly type: RType.Pipe;
|
|
5
5
|
readonly lhs: RNode<Info>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Base, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RExpressionList } from './r-expression-list';
|
|
1
|
+
import type { Base, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RExpressionList } from './r-expression-list';
|
|
4
4
|
/**
|
|
5
5
|
* ```ts
|
|
6
6
|
* repeat <body>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Leaf, Location, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RStringValue } from '../../../values';
|
|
1
|
+
import type { Leaf, Location, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RStringValue } from '../../../values';
|
|
4
4
|
export interface RString<Info = NoInfo> extends Leaf<Info>, Location {
|
|
5
5
|
readonly type: RType.String;
|
|
6
6
|
content: RStringValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Leaf, Location, Namespace, NoInfo } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
1
|
+
import type { Leaf, Location, Namespace, NoInfo } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
3
|
export declare function isSpecialSymbol(symbol: RSymbol): boolean;
|
|
4
4
|
export interface RSymbol<Info = NoInfo, T extends string = string> extends Leaf<Info>, Namespace, Location {
|
|
5
5
|
readonly type: RType.Symbol;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { UnaryOperatorFlavor } from '../operators';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { UnaryOperatorFlavor } from '../operators';
|
|
4
4
|
export interface RUnaryOp<Info = NoInfo> extends Base<Info>, Location {
|
|
5
5
|
readonly type: RType.UnaryOp;
|
|
6
6
|
readonly flavor: UnaryOperatorFlavor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
-
import { RType } from '../type';
|
|
3
|
-
import { RExpressionList } from './r-expression-list';
|
|
1
|
+
import type { Base, Location, NoInfo, RNode } from '../model';
|
|
2
|
+
import type { RType } from '../type';
|
|
3
|
+
import type { RExpressionList } from './r-expression-list';
|
|
4
4
|
/**
|
|
5
5
|
* ```ts
|
|
6
6
|
* while ( <condition> ) <body>
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
|
-
import { NoInfo, RNode } from '../model';
|
|
11
|
+
import type { NoInfo, RNode } from '../model';
|
|
12
12
|
import { BiMap } from '../../../../../util/bimap';
|
|
13
|
-
import { MergeableRecord } from '../../../../../util/objects';
|
|
13
|
+
import type { MergeableRecord } from '../../../../../util/objects';
|
|
14
14
|
import { RoleInParent } from './role';
|
|
15
15
|
/** The type of the id assigned to each node. Branded to avoid problematic usages with other string types. */
|
|
16
16
|
export type NodeId = string & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DeepReadonly } from 'ts-essentials';
|
|
2
|
-
import { RNode } from '../model';
|
|
3
|
-
import { StatefulFoldFunctions } from './stateful-fold';
|
|
1
|
+
import type { DeepReadonly } from 'ts-essentials';
|
|
2
|
+
import type { RNode } from '../model';
|
|
3
|
+
import type { StatefulFoldFunctions } from './stateful-fold';
|
|
4
4
|
export type FoldFunctions<Info, Out> = Omit<StatefulFoldFunctions<Info, undefined, Out>, 'down'>;
|
|
5
5
|
/**
|
|
6
6
|
* Folds in old functional-fashion over the AST structure.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DecoratedAstMap, RNodeWithParent } from './decorate';
|
|
1
|
+
import type { DecoratedAstMap, RNodeWithParent } from './decorate';
|
|
2
2
|
/**
|
|
3
3
|
* Describes the role of the node in its parent. For example,
|
|
4
4
|
* if we have `if(TRUE) { ... }`, the role of the `TRUE` node is `IfCondition`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DeepReadonly } from 'ts-essentials';
|
|
2
|
-
import { RExpressionList, RNumber, RSymbol, RLogical, RString, RArithmeticBinaryOp, RAssignmentOp, RComparisonBinaryOp, RLogicalBinaryOp, RArithmeticUnaryOp, RLogicalUnaryOp, RIfThenElse, RForLoop, RRepeatLoop, RWhileLoop, RFunctionCall, RComment, RNext, RBreak, RParameter, RArgument, RFunctionDefinition, RAccess, RModelFormulaBinaryOp, RModelFormulaUnaryOp, RLineDirective, RPipe } from '../nodes';
|
|
3
|
-
import { RNode } from '../model';
|
|
1
|
+
import type { DeepReadonly } from 'ts-essentials';
|
|
2
|
+
import type { RExpressionList, RNumber, RSymbol, RLogical, RString, RArithmeticBinaryOp, RAssignmentOp, RComparisonBinaryOp, RLogicalBinaryOp, RArithmeticUnaryOp, RLogicalUnaryOp, RIfThenElse, RForLoop, RRepeatLoop, RWhileLoop, RFunctionCall, RComment, RNext, RBreak, RParameter, RArgument, RFunctionDefinition, RAccess, RModelFormulaBinaryOp, RModelFormulaUnaryOp, RLineDirective, RPipe } from '../nodes';
|
|
3
|
+
import type { RNode } from '../model';
|
|
4
4
|
/**
|
|
5
5
|
* Called during the down-pass, will pe propagated to children and used in the up-pass (see {@link StatefulFoldFunctions}).
|
|
6
6
|
* <p>
|