runmat 0.5.7-dev.2 → 0.5.7-dev.3
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/artifacts/stdlib.snapshot +0 -0
- package/dist/generated/builtin-examples-catalog.d.ts.map +1 -1
- package/dist/generated/builtin-examples-catalog.js +1 -1
- package/dist/generated/builtin-examples-catalog.js.map +1 -1
- package/dist/generated/builtins/inputParser.d.ts +4 -0
- package/dist/generated/builtins/inputParser.d.ts.map +1 -0
- package/dist/generated/builtins/inputParser.js +71 -0
- package/dist/generated/builtins/inputParser.js.map +1 -0
- package/dist/generated/builtins-manifest.d.ts.map +1 -1
- package/dist/generated/builtins-manifest.js +20 -0
- package/dist/generated/builtins-manifest.js.map +1 -1
- package/dist/lsp/runmat_lsp.js +2 -2
- package/dist/lsp/runmat_lsp_bg.wasm +0 -0
- package/dist/pkg-web/runmat_wasm_web.js +3 -3
- package/dist/pkg-web/runmat_wasm_web_bg.wasm +0 -0
- package/dist/runtime/stdlib.snapshot +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputParser.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/inputParser.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAkEjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "inputParser",
|
|
5
|
+
"category": "introspection",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"inputParser",
|
|
8
|
+
"addParameter",
|
|
9
|
+
"parse",
|
|
10
|
+
"name-value",
|
|
11
|
+
"varargin"
|
|
12
|
+
],
|
|
13
|
+
"summary": "Parse MATLAB-style optional name-value arguments.",
|
|
14
|
+
"gpu_support": {
|
|
15
|
+
"elementwise": false,
|
|
16
|
+
"reduction": false,
|
|
17
|
+
"precisions": [],
|
|
18
|
+
"broadcasting": "none",
|
|
19
|
+
"notes": "inputParser stores host-side metadata and parsed values."
|
|
20
|
+
},
|
|
21
|
+
"fusion": {
|
|
22
|
+
"elementwise": false,
|
|
23
|
+
"reduction": false,
|
|
24
|
+
"max_inputs": 0,
|
|
25
|
+
"constants": "inline"
|
|
26
|
+
},
|
|
27
|
+
"requires_feature": null,
|
|
28
|
+
"tested": {
|
|
29
|
+
"unit": "builtins::introspection::input_parser::tests",
|
|
30
|
+
"integration": "runmat-vm inputParser tests"
|
|
31
|
+
},
|
|
32
|
+
"description": "`inputParser` creates a handle object for parsing common MATLAB name-value argument patterns. RunMat supports the minimal workflow used by imported helper functions: create a parser, register parameters with defaults, parse `varargin{:}`, and read values from `p.Results`.",
|
|
33
|
+
"behaviors": [
|
|
34
|
+
"`p = inputParser` returns a handle object with an initially empty `Results` struct.",
|
|
35
|
+
"`addParameter(p, name, default)` registers a case-sensitive name and default value, mutating `p` in place.",
|
|
36
|
+
"`parse(p, name, value, ...)` starts from the registered defaults and applies exact name matches.",
|
|
37
|
+
"`p.Results.<name>` reads the parsed value for a registered parameter.",
|
|
38
|
+
"Duplicate parameter names, odd name-value argument counts, non-text names, and unknown parsed names raise stable RunMat errors.",
|
|
39
|
+
"This compatibility slice does not yet implement `addRequired`, `addOptional`, validators, `CaseSensitive`, `PartialMatching`, `KeepUnmatched`, or `StructExpand`."
|
|
40
|
+
],
|
|
41
|
+
"examples": [
|
|
42
|
+
{
|
|
43
|
+
"description": "Parse an optional scale parameter",
|
|
44
|
+
"input": "function y = f(varargin)\n p = inputParser;\n addParameter(p, 'scale', 2);\n parse(p, varargin{:});\n y = p.Results.scale;\nend\n\nf('scale', 4)",
|
|
45
|
+
"output": "ans =\n 4"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"description": "Use a registered default when the name is omitted",
|
|
49
|
+
"input": "p = inputParser;\naddParameter(p, 'scale', 2);\nparse(p);\np.Results.scale",
|
|
50
|
+
"output": "ans =\n 2"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"faqs": [
|
|
54
|
+
{
|
|
55
|
+
"question": "Are parameter names case-sensitive?",
|
|
56
|
+
"answer": "Yes. This initial RunMat implementation uses exact case-sensitive name matching."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"question": "Does RunMat support validators or positional arguments?",
|
|
60
|
+
"answer": "Not yet. The current support is intentionally limited to optional name-value parameters registered with `addParameter`."
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"key": "inputparser",
|
|
64
|
+
"slug": "inputparser",
|
|
65
|
+
"aliases": [],
|
|
66
|
+
"categoryPath": [
|
|
67
|
+
"introspection"
|
|
68
|
+
]
|
|
69
|
+
};
|
|
70
|
+
export default builtinDoc;
|
|
71
|
+
//# sourceMappingURL=inputParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputParser.js","sourceRoot":"","sources":["../../../src/generated/builtins/inputParser.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,eAAe;IAC3B,UAAU,EAAE;QACV,aAAa;QACb,cAAc;QACd,OAAO;QACP,YAAY;QACZ,UAAU;KACX;IACD,SAAS,EAAE,mDAAmD;IAC9D,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,0DAA0D;KACpE;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;KACtB;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,8CAA8C;QACtD,aAAa,EAAE,6BAA6B;KAC7C;IACD,aAAa,EAAE,kRAAkR;IACjS,WAAW,EAAE;QACX,qFAAqF;QACrF,4GAA4G;QAC5G,kGAAkG;QAClG,uEAAuE;QACvE,iIAAiI;QACjI,mKAAmK;KACpK;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,mCAAmC;YAClD,OAAO,EAAE,sJAAsJ;YAC/J,QAAQ,EAAE,eAAe;SAC1B;QACD;YACE,aAAa,EAAE,mDAAmD;YAClE,OAAO,EAAE,4EAA4E;YACrF,QAAQ,EAAE,eAAe;SAC1B;KACF;IACD,MAAM,EAAE;QACN;YACE,UAAU,EAAE,qCAAqC;YACjD,QAAQ,EAAE,kFAAkF;SAC7F;QACD;YACE,UAAU,EAAE,yDAAyD;YACrE,QAAQ,EAAE,yHAAyH;SACpI;KACF;IACD,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,aAAa;IACrB,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,eAAe;KAChB;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/builtins-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,eAAO,MAAM,eAAe,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"builtins-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/builtins-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,eAAO,MAAM,eAAe,EAAE,oBAAoB,EAujTjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAme9D,CAAC;AAEF,eAAO,MAAM,4BAA4B,sEAC0C,CAAC"}
|
|
@@ -4038,6 +4038,25 @@ export const builtinManifest = [
|
|
|
4038
4038
|
"summary": "Prompt users for interactive input in MATLAB and RunMat.",
|
|
4039
4039
|
"exampleCount": 1
|
|
4040
4040
|
},
|
|
4041
|
+
{
|
|
4042
|
+
"key": "inputparser",
|
|
4043
|
+
"title": "inputParser",
|
|
4044
|
+
"slug": "inputparser",
|
|
4045
|
+
"aliases": [],
|
|
4046
|
+
"category": "introspection",
|
|
4047
|
+
"categoryPath": [
|
|
4048
|
+
"introspection"
|
|
4049
|
+
],
|
|
4050
|
+
"keywords": [
|
|
4051
|
+
"inputParser",
|
|
4052
|
+
"addParameter",
|
|
4053
|
+
"parse",
|
|
4054
|
+
"name-value",
|
|
4055
|
+
"varargin"
|
|
4056
|
+
],
|
|
4057
|
+
"summary": "Parse MATLAB-style optional name-value arguments.",
|
|
4058
|
+
"exampleCount": 2
|
|
4059
|
+
},
|
|
4041
4060
|
{
|
|
4042
4061
|
"key": "int",
|
|
4043
4062
|
"title": "int",
|
|
@@ -9964,6 +9983,7 @@ export const builtinDocLoaders = {
|
|
|
9964
9983
|
"ind2sub": () => import("./builtins/ind2sub.js").then((mod) => mod.default),
|
|
9965
9984
|
"inf": () => import("./builtins/inf.js").then((mod) => mod.default),
|
|
9966
9985
|
"input": () => import("./builtins/input.js").then((mod) => mod.default),
|
|
9986
|
+
"inputparser": () => import("./builtins/inputParser.js").then((mod) => mod.default),
|
|
9967
9987
|
"int": () => import("./builtins/int.js").then((mod) => mod.default),
|
|
9968
9988
|
"integral": () => import("./builtins/integral.js").then((mod) => mod.default),
|
|
9969
9989
|
"interp1": () => import("./builtins/interp1.js").then((mod) => mod.default),
|