@rsconcept/domain 2.1.2 → 2.2.0
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/dist/api-Bf0f_uiI.d.ts +57 -0
- package/dist/{diagnostics-CY9sKggB.js → diagnostics-B1OfMra1.js} +412 -174
- package/dist/diagnostics-B1OfMra1.js.map +1 -0
- package/dist/{diagnostics-EaIt3zIw.d.ts → diagnostics-Db1F7ruF.d.ts} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/library/diagnostics.d.ts +1 -1
- package/dist/library/diagnostics.js +1 -1
- package/dist/library/index.d.ts +1 -1
- package/dist/library/index.js +1 -1
- package/dist/library/oss-api.d.ts +1 -1
- package/dist/library/oss-api.js +3 -3
- package/dist/library/oss-api.js.map +1 -1
- package/dist/library/rsengine.d.ts +1 -1
- package/dist/library/rsengine.js +1 -1
- package/dist/library/{rsform-api.d.ts → rsform-api/index.d.ts} +109 -66
- package/dist/library/rsform-api/index.js +2 -0
- package/dist/library/rsform.d.ts +1 -1
- package/dist/library/rsform.js.map +1 -1
- package/dist/library/rsmodel-api.d.ts +1 -1
- package/dist/library/rsmodel-api.js +3 -1
- package/dist/library/rsmodel-api.js.map +1 -1
- package/dist/library/rsmodel.d.ts +1 -1
- package/dist/library/structure-planner.d.ts +1 -1
- package/dist/library/structure-planner.js +1 -1
- package/dist/rslang/api.d.ts +2 -58
- package/dist/rslang/api.js +1 -1
- package/dist/rslang/index.js +1 -1
- package/dist/rslang/parser/syntax-errors/index.js +1 -1
- package/dist/rslang/semantic/analyzer.js +2 -2
- package/dist/{syntax-errors-DwPXhpVe.js → syntax-errors-BN_bqTaX.js} +2 -2
- package/dist/{syntax-errors-DwPXhpVe.js.map → syntax-errors-BN_bqTaX.js.map} +1 -1
- package/package.json +3 -3
- package/src/library/oss-api.ts +5 -2
- package/src/library/rsform-api/alias.ts +104 -0
- package/src/library/rsform-api/analysis.ts +157 -0
- package/src/library/rsform-api/cst-type.ts +216 -0
- package/src/library/rsform-api/expression.ts +73 -0
- package/src/library/rsform-api/formal-graph.test.ts +72 -0
- package/src/library/rsform-api/formal-graph.ts +195 -0
- package/src/library/rsform-api/index.ts +32 -0
- package/src/library/rsform-api/semantic-relations.ts +117 -0
- package/src/library/rsform-api/stats.ts +170 -0
- package/src/library/rsform-api/structure.ts +93 -0
- package/src/library/rsform-api/synthesis.ts +27 -0
- package/src/library/rsform-api/types.ts +21 -0
- package/src/library/rsform.ts +2 -2
- package/src/library/rsmodel-api.ts +7 -1
- package/dist/diagnostics-CY9sKggB.js.map +0 -1
- package/dist/library/rsform-api.js +0 -2
- package/src/library/rsform-api.ts +0 -755
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { t as AstNode } from "./ast-C8sIpKdL.js";
|
|
2
|
+
import { n as ArgumentsType } from "./arguments-extractor-ngatANBI.js";
|
|
3
|
+
//#region src/rslang/api.d.ts
|
|
4
|
+
/** Represents alias mapping. */
|
|
5
|
+
type AliasMapping = Record<string, string>;
|
|
6
|
+
/** Whether {@link value} is a single schema global alias (e.g. `X1`, `F42`). */
|
|
7
|
+
declare function isGlobalAlias(value: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Parse a RSLang expression into a normalized AST.
|
|
10
|
+
*
|
|
11
|
+
* Returns `null` for blank input. Parses the original `expression` string so node
|
|
12
|
+
* offsets match the source text (required for slice-based AST walks).
|
|
13
|
+
*/
|
|
14
|
+
declare function parseRSLangExpression(expression: string): AstNode | null;
|
|
15
|
+
/** Extract arguments from AST. */
|
|
16
|
+
declare function extractArguments(ast: AstNode): ArgumentsType[];
|
|
17
|
+
/** Extracts global variable names from a given expression. */
|
|
18
|
+
declare function extractGlobals(expression: string): Set<string>;
|
|
19
|
+
/** Check if expression is simple derivation. */
|
|
20
|
+
declare function isSimpleExpression(text: string): boolean;
|
|
21
|
+
/** Check if expression is set typification. */
|
|
22
|
+
declare function isSetTypification(text: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Splits a string containing a template definition into its head and body parts.
|
|
25
|
+
*
|
|
26
|
+
* A template definition is expected to have the following format: `[head] body`.
|
|
27
|
+
* If the input string does not contain the opening square bracket '[', the entire
|
|
28
|
+
* string is treated as the body, and an empty string is assigned to the head.
|
|
29
|
+
* If the opening bracket is present, the function attempts to find the matching
|
|
30
|
+
* closing bracket ']' to determine the head and body parts.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const template = '[header] body content';
|
|
34
|
+
* const result = splitTemplateDefinition(template);
|
|
35
|
+
* // result: `{ head: 'header', body: 'body content' }`
|
|
36
|
+
*/
|
|
37
|
+
declare function splitTemplateDefinition(target: string): {
|
|
38
|
+
head: string;
|
|
39
|
+
body: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Substitutes values for template arguments in a given expression.
|
|
43
|
+
*
|
|
44
|
+
* This function takes an input mathematical expression and a list of argument values.
|
|
45
|
+
* It replaces template argument placeholders in the expression with their corresponding values
|
|
46
|
+
* from the provided arguments.
|
|
47
|
+
*/
|
|
48
|
+
declare function substituteTemplateArgs(expression: string, mapping: AliasMapping): string;
|
|
49
|
+
/** Substitute local parameter aliases in an expression fragment. */
|
|
50
|
+
declare function substituteLocalAliases(expression: string, mapping: AliasMapping): string;
|
|
51
|
+
/** Apply alias mapping. */
|
|
52
|
+
declare function applyAliasMapping(target: string, mapping: AliasMapping): string;
|
|
53
|
+
/** Apply alias typification mapping. */
|
|
54
|
+
declare function applyTypificationMapping(target: string, mapping: AliasMapping): string;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { extractGlobals as a, isSimpleExpression as c, substituteLocalAliases as d, substituteTemplateArgs as f, extractArguments as i, parseRSLangExpression as l, applyAliasMapping as n, isGlobalAlias as o, applyTypificationMapping as r, isSetTypification as s, AliasMapping as t, splitTemplateDefinition as u };
|
|
57
|
+
//# sourceMappingURL=api-Bf0f_uiI.d.ts.map
|