@ifc-lite/export 4.0.0 → 4.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/README.md +7 -0
- package/dist/anonymize-placement.d.ts.map +1 -1
- package/dist/anonymize-placement.js +3 -4
- package/dist/anonymize-placement.js.map +1 -1
- package/dist/anonymize-scrub.d.ts +6 -0
- package/dist/anonymize-scrub.d.ts.map +1 -1
- package/dist/anonymize-scrub.js +3 -2
- package/dist/anonymize-scrub.js.map +1 -1
- package/dist/appearance-dependencies.d.ts +12 -0
- package/dist/appearance-dependencies.d.ts.map +1 -0
- package/dist/appearance-dependencies.js +191 -0
- package/dist/appearance-dependencies.js.map +1 -0
- package/dist/authored-resource-cleanup.d.ts +14 -0
- package/dist/authored-resource-cleanup.d.ts.map +1 -0
- package/dist/authored-resource-cleanup.js +156 -0
- package/dist/authored-resource-cleanup.js.map +1 -0
- package/dist/effective-appearance-record.d.ts +8 -0
- package/dist/effective-appearance-record.d.ts.map +1 -0
- package/dist/effective-appearance-record.js +45 -0
- package/dist/effective-appearance-record.js.map +1 -0
- package/dist/ifc5-appearance.d.ts +20 -0
- package/dist/ifc5-appearance.d.ts.map +1 -0
- package/dist/ifc5-appearance.js +106 -0
- package/dist/ifc5-appearance.js.map +1 -0
- package/dist/ifc5-exporter.d.ts +3 -0
- package/dist/ifc5-exporter.d.ts.map +1 -1
- package/dist/ifc5-exporter.js +19 -9
- package/dist/ifc5-exporter.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/lod0-generator.d.ts +16 -0
- package/dist/lod0-generator.d.ts.map +1 -1
- package/dist/lod0-generator.js +33 -1
- package/dist/lod0-generator.js.map +1 -1
- package/dist/merged-context.d.ts.map +1 -1
- package/dist/merged-context.js +15 -1
- package/dist/merged-context.js.map +1 -1
- package/dist/merged-empty-containers.d.ts.map +1 -1
- package/dist/merged-empty-containers.js +3 -2
- package/dist/merged-empty-containers.js.map +1 -1
- package/dist/merged-subcontext.d.ts.map +1 -1
- package/dist/merged-subcontext.js +19 -1
- package/dist/merged-subcontext.js.map +1 -1
- package/dist/obj.d.ts +20 -0
- package/dist/obj.d.ts.map +1 -0
- package/dist/obj.js +40 -0
- package/dist/obj.js.map +1 -0
- package/dist/parquet-exporter.d.ts.map +1 -1
- package/dist/parquet-exporter.js +5 -5
- package/dist/parquet-exporter.js.map +1 -1
- package/dist/reference-collector.d.ts +1 -0
- package/dist/reference-collector.d.ts.map +1 -1
- package/dist/reference-collector.js +5 -4
- package/dist/reference-collector.js.map +1 -1
- package/dist/retype.d.ts +1 -1
- package/dist/retype.d.ts.map +1 -1
- package/dist/retype.js +13 -3
- package/dist/retype.js.map +1 -1
- package/dist/schema-converter-attr-remap.d.ts +26 -4
- package/dist/schema-converter-attr-remap.d.ts.map +1 -1
- package/dist/schema-converter-attr-remap.js +28 -46
- package/dist/schema-converter-attr-remap.js.map +1 -1
- package/dist/step-argument-parser.d.ts +8 -1
- package/dist/step-argument-parser.d.ts.map +1 -1
- package/dist/step-argument-parser.js +40 -1
- package/dist/step-argument-parser.js.map +1 -1
- package/dist/step-attribute-mutations.d.ts +32 -2
- package/dist/step-attribute-mutations.d.ts.map +1 -1
- package/dist/step-attribute-mutations.js +87 -6
- package/dist/step-attribute-mutations.js.map +1 -1
- package/dist/step-comment-skip.d.ts +13 -0
- package/dist/step-comment-skip.d.ts.map +1 -0
- package/dist/step-comment-skip.js +19 -0
- package/dist/step-comment-skip.js.map +1 -0
- package/dist/step-export-types.d.ts +51 -0
- package/dist/step-export-types.d.ts.map +1 -1
- package/dist/step-export-types.js +38 -0
- package/dist/step-export-types.js.map +1 -1
- package/dist/step-outer-args.d.ts +27 -0
- package/dist/step-outer-args.d.ts.map +1 -0
- package/dist/step-outer-args.js +64 -0
- package/dist/step-outer-args.js.map +1 -0
- package/dist/step-property-sets.d.ts.map +1 -1
- package/dist/step-property-sets.js +8 -2
- package/dist/step-property-sets.js.map +1 -1
- package/dist/step-slot-grammar.d.ts +24 -0
- package/dist/step-slot-grammar.d.ts.map +1 -0
- package/dist/step-slot-grammar.js +201 -0
- package/dist/step-slot-grammar.js.map +1 -0
- package/dist/step-source-iteration.d.ts.map +1 -1
- package/dist/step-source-iteration.js +26 -2
- package/dist/step-source-iteration.js.map +1 -1
- package/dist/style-closure.d.ts +3 -1
- package/dist/style-closure.d.ts.map +1 -1
- package/dist/style-closure.js +16 -1
- package/dist/style-closure.js.map +1 -1
- package/dist/texture-map-closure.d.ts +10 -0
- package/dist/texture-map-closure.d.ts.map +1 -0
- package/dist/texture-map-closure.js +22 -0
- package/dist/texture-map-closure.js.map +1 -0
- package/dist/unit-normalize.d.ts.map +1 -1
- package/dist/unit-normalize.js +12 -49
- package/dist/unit-normalize.js.map +1 -1
- package/package.json +8 -7
package/dist/retype.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retype.js","sourceRoot":"","sources":["../src/retype.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"retype.js","sourceRoot":"","sources":["../src/retype.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAQvE,SAAS,cAAc,CACrB,IAAwG;IAExG,MAAM,GAAG,GAAG,IA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|
5
5
|
* `schema-converter.ts`'s line budget (`scripts/module-size-allowlist.txt`).
|
|
6
6
|
*/
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
/**
|
|
8
|
+
* Split a raw STEP attribute list into its top-level (comma-separated)
|
|
9
|
+
* value strings, respecting nested parentheses and single-quoted strings.
|
|
10
|
+
* Empty list → [].
|
|
11
|
+
*
|
|
12
|
+
* A thin wrapper over `step-argument-parser.ts`'s `splitTopLevelArgs` — the
|
|
13
|
+
* same package's general-purpose top-level-comma splitter, already used by
|
|
14
|
+
* seven other read paths in this package (`retype.ts`, `reference-collector.ts`,
|
|
15
|
+
* `merged-empty-containers.ts`, etc). This module used to carry its own
|
|
16
|
+
* near-identical scan; kept here as `remapRenamedAttributesByName`'s only
|
|
17
|
+
* caller expects, but no longer a fourth copy of the same rule
|
|
18
|
+
* (LTplus-AG/ifc-lite#4125). `trimAttributes` in `schema-converter.ts` is
|
|
19
|
+
* NOT folded in here: it stops early at a positional budget, which is a
|
|
20
|
+
* genuinely different rule, not a copy of this one.
|
|
21
|
+
*
|
|
22
|
+
* `splitTopLevelArgs` behaves differently from the old local scanner in two
|
|
23
|
+
* ways: it drops a trailing empty argument (`"a,"` → `['a']`) rather than
|
|
24
|
+
* keeping it as `['a', '']`, and it trims each token
|
|
25
|
+
* (`"a, b,c"` → `['a','b','c']` instead of `['a',' b','c']`). Both are safe
|
|
26
|
+
* for `remapRenamedAttributesByName`'s real inputs: neither `IFCDOORTYPE`
|
|
27
|
+
* nor `IFCWINDOWTYPE`'s fixed-arity attribute list has a trailing comma in
|
|
28
|
+
* well-formed STEP, so the first difference never fires; and STEP has no
|
|
29
|
+
* semantic significance to whitespace between top-level tokens, so a trimmed
|
|
30
|
+
* token is the same value either way. Pinned by
|
|
31
|
+
* `schema-converter-attr-remap.test.ts`.
|
|
32
|
+
*/
|
|
11
33
|
export declare function splitTopLevelAttributes(attrsRaw: string): string[];
|
|
12
34
|
/**
|
|
13
35
|
* Renamed entity types whose attribute lists are safe to reconcile BY NAME
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-converter-attr-remap.d.ts","sourceRoot":"","sources":["../src/schema-converter-attr-remap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema-converter-attr-remap.d.ts","sourceRoot":"","sources":["../src/schema-converter-attr-remap.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAElE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,aAA4C,CAAC;AAElF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,MAAM,CAOR"}
|
|
@@ -1,59 +1,41 @@
|
|
|
1
1
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
2
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { splitTopLevelArgs } from './step-argument-parser.js';
|
|
4
5
|
/**
|
|
5
6
|
* Attribute-list reconciliation for a genuine cross-schema entity RENAME
|
|
6
7
|
* whose lists fail `schema-converter.ts`'s strict-prefix test (neither list
|
|
7
8
|
* is a positional prefix of the other). Split out to stay under
|
|
8
9
|
* `schema-converter.ts`'s line budget (`scripts/module-size-allowlist.txt`).
|
|
9
10
|
*/
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
/**
|
|
12
|
+
* Split a raw STEP attribute list into its top-level (comma-separated)
|
|
13
|
+
* value strings, respecting nested parentheses and single-quoted strings.
|
|
14
|
+
* Empty list → [].
|
|
15
|
+
*
|
|
16
|
+
* A thin wrapper over `step-argument-parser.ts`'s `splitTopLevelArgs` — the
|
|
17
|
+
* same package's general-purpose top-level-comma splitter, already used by
|
|
18
|
+
* seven other read paths in this package (`retype.ts`, `reference-collector.ts`,
|
|
19
|
+
* `merged-empty-containers.ts`, etc). This module used to carry its own
|
|
20
|
+
* near-identical scan; kept here as `remapRenamedAttributesByName`'s only
|
|
21
|
+
* caller expects, but no longer a fourth copy of the same rule
|
|
22
|
+
* (LTplus-AG/ifc-lite#4125). `trimAttributes` in `schema-converter.ts` is
|
|
23
|
+
* NOT folded in here: it stops early at a positional budget, which is a
|
|
24
|
+
* genuinely different rule, not a copy of this one.
|
|
25
|
+
*
|
|
26
|
+
* `splitTopLevelArgs` behaves differently from the old local scanner in two
|
|
27
|
+
* ways: it drops a trailing empty argument (`"a,"` → `['a']`) rather than
|
|
28
|
+
* keeping it as `['a', '']`, and it trims each token
|
|
29
|
+
* (`"a, b,c"` → `['a','b','c']` instead of `['a',' b','c']`). Both are safe
|
|
30
|
+
* for `remapRenamedAttributesByName`'s real inputs: neither `IFCDOORTYPE`
|
|
31
|
+
* nor `IFCWINDOWTYPE`'s fixed-arity attribute list has a trailing comma in
|
|
32
|
+
* well-formed STEP, so the first difference never fires; and STEP has no
|
|
33
|
+
* semantic significance to whitespace between top-level tokens, so a trimmed
|
|
34
|
+
* token is the same value either way. Pinned by
|
|
35
|
+
* `schema-converter-attr-remap.test.ts`.
|
|
36
|
+
*/
|
|
14
37
|
export function splitTopLevelAttributes(attrsRaw) {
|
|
15
|
-
|
|
16
|
-
return [];
|
|
17
|
-
const attrs = [];
|
|
18
|
-
let depth = 0;
|
|
19
|
-
let inString = false;
|
|
20
|
-
let current = '';
|
|
21
|
-
for (let i = 0; i < attrsRaw.length; i++) {
|
|
22
|
-
const ch = attrsRaw[i];
|
|
23
|
-
if (ch === "'" && !inString) {
|
|
24
|
-
inString = true;
|
|
25
|
-
current += ch;
|
|
26
|
-
}
|
|
27
|
-
else if (ch === "'" && inString) {
|
|
28
|
-
if (i + 1 < attrsRaw.length && attrsRaw[i + 1] === "'") {
|
|
29
|
-
current += "''";
|
|
30
|
-
i++;
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
inString = false;
|
|
34
|
-
current += ch;
|
|
35
|
-
}
|
|
36
|
-
else if (inString) {
|
|
37
|
-
current += ch;
|
|
38
|
-
}
|
|
39
|
-
else if (ch === '(') {
|
|
40
|
-
depth++;
|
|
41
|
-
current += ch;
|
|
42
|
-
}
|
|
43
|
-
else if (ch === ')') {
|
|
44
|
-
depth--;
|
|
45
|
-
current += ch;
|
|
46
|
-
}
|
|
47
|
-
else if (ch === ',' && depth === 0) {
|
|
48
|
-
attrs.push(current);
|
|
49
|
-
current = '';
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
current += ch;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
attrs.push(current);
|
|
56
|
-
return attrs;
|
|
38
|
+
return splitTopLevelArgs(attrsRaw);
|
|
57
39
|
}
|
|
58
40
|
/**
|
|
59
41
|
* Renamed entity types whose attribute lists are safe to reconcile BY NAME
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-converter-attr-remap.js","sourceRoot":"","sources":["../src/schema-converter-attr-remap.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D
|
|
1
|
+
{"version":3,"file":"schema-converter-attr-remap.js","sourceRoot":"","sources":["../src/schema-converter-attr-remap.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,QAAgB,EAChB,QAA2B,EAC3B,QAA2B;IAE3B,MAAM,MAAM,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9D,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
/**
|
|
20
20
|
* Split a STEP argument list on top-level commas, respecting nested
|
|
21
|
-
*
|
|
21
|
+
* parens, quoted strings, and comments (#4227). Used by `applyAttributeMutations`.
|
|
22
22
|
*/
|
|
23
23
|
export declare function splitTopLevelArgs(text: string): string[];
|
|
24
24
|
/**
|
|
@@ -70,6 +70,13 @@ export declare function replaceStepArgument(entityText: string, attrIndex: numbe
|
|
|
70
70
|
* dips negative and climbs back looks balanced at the end while every comma
|
|
71
71
|
* in between was read as nested.
|
|
72
72
|
*
|
|
73
|
+
* A part whose parentheses nest deeper than the per-slot grammar's bound is
|
|
74
|
+
* refused the same way — see `MAX_SLOT_NESTING_DEPTH` in `step-slot-grammar.ts`
|
|
75
|
+
* for why that bound exists and how the number was chosen. It is the one
|
|
76
|
+
* rejection here that is not about the record's text being wrong; it is what
|
|
77
|
+
* keeps this function's answer to "parts, or null" total, instead of letting a
|
|
78
|
+
* deeply nested list reach the caller as a thrown `RangeError` nothing handles.
|
|
79
|
+
*
|
|
73
80
|
* An EMPTY top-level slot (`a,,b`, or a trailing comma) is deliberately NOT
|
|
74
81
|
* rejected, though it is invalid STEP. It costs no alignment: an empty argument
|
|
75
82
|
* is ONE part, exactly as the entity parser counts it, so every index still
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-argument-parser.d.ts","sourceRoot":"","sources":["../src/step-argument-parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step-argument-parser.d.ts","sourceRoot":"","sources":["../src/step-argument-parser.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;GAiBG;AACH;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CA4DxD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CAyBf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAmEzE"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
4
|
import { STEP_TRIVIA } from '@ifc-lite/parser';
|
|
5
|
+
import { skipStepComment } from './step-comment-skip.js';
|
|
6
|
+
import { isWellFormedStepSlot } from './step-slot-grammar.js';
|
|
5
7
|
/**
|
|
6
8
|
* `#N=CLASS(...)` record prefix, with STEP trivia (whitespace and/or a
|
|
7
9
|
* `/* ... */` comment, #3789) tolerated between the type name and its `(`
|
|
@@ -31,7 +33,7 @@ const RECORD_PREFIX_RE = new RegExp(`^(#\\d+\\s*=\\s*\\w+${STEP_TRIVIA}\\()([\\s
|
|
|
31
33
|
*/
|
|
32
34
|
/**
|
|
33
35
|
* Split a STEP argument list on top-level commas, respecting nested
|
|
34
|
-
*
|
|
36
|
+
* parens, quoted strings, and comments (#4227). Used by `applyAttributeMutations`.
|
|
35
37
|
*/
|
|
36
38
|
export function splitTopLevelArgs(text) {
|
|
37
39
|
const parts = [];
|
|
@@ -40,6 +42,12 @@ export function splitTopLevelArgs(text) {
|
|
|
40
42
|
let inString = false;
|
|
41
43
|
for (let i = 0; i < text.length; i++) {
|
|
42
44
|
const char = text[i];
|
|
45
|
+
if (!inString && char === '/' && text[i + 1] === '*') {
|
|
46
|
+
const stop = skipStepComment(text, i); // see skipStepComment's docstring
|
|
47
|
+
current += text.slice(i, stop);
|
|
48
|
+
i = stop - 1;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
43
51
|
current += char;
|
|
44
52
|
if (inString) {
|
|
45
53
|
if (char === '\'') {
|
|
@@ -156,6 +164,13 @@ export function replaceStepArgument(entityText, attrIndex, replacement) {
|
|
|
156
164
|
* dips negative and climbs back looks balanced at the end while every comma
|
|
157
165
|
* in between was read as nested.
|
|
158
166
|
*
|
|
167
|
+
* A part whose parentheses nest deeper than the per-slot grammar's bound is
|
|
168
|
+
* refused the same way — see `MAX_SLOT_NESTING_DEPTH` in `step-slot-grammar.ts`
|
|
169
|
+
* for why that bound exists and how the number was chosen. It is the one
|
|
170
|
+
* rejection here that is not about the record's text being wrong; it is what
|
|
171
|
+
* keeps this function's answer to "parts, or null" total, instead of letting a
|
|
172
|
+
* deeply nested list reach the caller as a thrown `RangeError` nothing handles.
|
|
173
|
+
*
|
|
159
174
|
* An EMPTY top-level slot (`a,,b`, or a trailing comma) is deliberately NOT
|
|
160
175
|
* rejected, though it is invalid STEP. It costs no alignment: an empty argument
|
|
161
176
|
* is ONE part, exactly as the entity parser counts it, so every index still
|
|
@@ -181,6 +196,14 @@ export function splitTopLevelStepArguments(input) {
|
|
|
181
196
|
let inString = false;
|
|
182
197
|
for (let i = 0; i < input.length; i++) {
|
|
183
198
|
const char = input[i];
|
|
199
|
+
// See skipStepComment's docstring; isWellFormedStepSlot below still
|
|
200
|
+
// rejects an unterminated comment via skipTrivia.
|
|
201
|
+
if (!inString && char === '/' && input[i + 1] === '*') {
|
|
202
|
+
const stop = skipStepComment(input, i);
|
|
203
|
+
current += input.slice(i, stop);
|
|
204
|
+
i = stop - 1;
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
184
207
|
if (char === "'") {
|
|
185
208
|
current += char;
|
|
186
209
|
if (inString && i + 1 < input.length && input[i + 1] === "'") {
|
|
@@ -212,6 +235,22 @@ export function splitTopLevelStepArguments(input) {
|
|
|
212
235
|
if (inString || depth !== 0)
|
|
213
236
|
return null;
|
|
214
237
|
parts.push(current);
|
|
238
|
+
// The three checks above (quote/paren/final-depth) track SCAN state, not
|
|
239
|
+
// slot content. A phantom string can swallow a real boundary — an
|
|
240
|
+
// undoubled `'` inside two different string-typed arguments reads as one
|
|
241
|
+
// string spanning both, so the text between them (`),$,IFCLABEL(` and
|
|
242
|
+
// similar) gets folded into a single part while quote parity and paren
|
|
243
|
+
// depth both stay clean — and a comment sitting alone between two commas
|
|
244
|
+
// (no value of its own) becomes its own phantom slot, shifting every index
|
|
245
|
+
// after it. Both leave every check above satisfied on a slot list that is
|
|
246
|
+
// not the record's actual arguments (#4162). Reject the whole split rather
|
|
247
|
+
// than hand back parts whose boundaries do not correspond to real slots —
|
|
248
|
+
// a null here is what lets `replaceStepArgument`'s by-index write refuse
|
|
249
|
+
// instead of landing on the wrong attribute.
|
|
250
|
+
for (const part of parts) {
|
|
251
|
+
if (!isWellFormedStepSlot(part))
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
215
254
|
return parts;
|
|
216
255
|
}
|
|
217
256
|
//# sourceMappingURL=step-argument-parser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-argument-parser.js","sourceRoot":"","sources":["../src/step-argument-parser.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"step-argument-parser.js","sourceRoot":"","sources":["../src/step-argument-parser.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC,uBAAuB,WAAW,gCAAgC,CAAC,CAAC;AAExG;;;;;;;;;;;;;;;;;GAiBG;AACH;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,QAAQ,GAAG,KAAK,CAAC;IAErB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;YACrD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,kCAAkC;YACzE,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,C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AG,EAAE,CAAC;gBACb,SAAS;YACX,CAAC;QACH,CAAC;QAED,OAAO,IAAI,IAAI,CAAC;IAClB,CAAC;IAED,IAAI,QAAQ,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEpB,yEAAyE;IACzE,kEAAkE;IAClE,yEAAyE;IACzE,sEAAsE;IACtE,uEAAuE;IACvE,yEAAyE;IACzE,2EAA2E;IAC3E,0EAA0E;IAC1E,2EAA2E;IAC3E,0EAA0E;IAC1E,yEAAyE;IACzE,6CAA6C;IAC7C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -29,8 +29,8 @@ import type { SourceLineMutations } from './step-exporter.js';
|
|
|
29
29
|
* The expressId is unchanged by all of this, so geometry / placement /
|
|
30
30
|
* representation and every IfcRel* reference (keyed by #id) carry over.
|
|
31
31
|
*
|
|
32
|
-
*
|
|
33
|
-
* operation change the line", measured across that operation alone. The count
|
|
32
|
+
* The three delivery flags report EFFECT, not intent — each is the answer to
|
|
33
|
+
* "did this operation change the line", measured across that operation alone. The count
|
|
34
34
|
* and the ledger are claims about the FILE, so an edit that resolves to the
|
|
35
35
|
* text already there has delivered nothing and must not be reported: retyping
|
|
36
36
|
* an entity to the class it already is, or writing a positional slot the token
|
|
@@ -44,6 +44,36 @@ import type { SourceLineMutations } from './step-exporter.js';
|
|
|
44
44
|
* two are nominated (their edits have no earlier nomination site); named
|
|
45
45
|
* attribute edits are nominated by the collection pass and `attributed` only
|
|
46
46
|
* settles their delivery.
|
|
47
|
+
*
|
|
48
|
+
* `unreadable` is the fourth field and answers a different question: not what
|
|
49
|
+
* this line carries, but whether the pipeline could read it at all. Every edit
|
|
50
|
+
* kind above writes a slot BY INDEX, so all of them refuse together on a record
|
|
51
|
+
* whose argument list does not scan — and three false delivery flags cannot say
|
|
52
|
+
* that, because a discarded edit sets them too. Both call sites turn it into a
|
|
53
|
+
* warning naming the entity (#4125).
|
|
47
54
|
*/
|
|
48
55
|
export declare function applySourceLineMutations(mutationView: MutablePropertyView | null, expressId: number, entityText: string, recordType: string, attributeMutations: Map<string, string> | undefined, sourceSchema: IfcSchemaVersion, overlayActive: boolean, onRejected?: (attrName: string, value: string) => void): SourceLineMutations;
|
|
56
|
+
/**
|
|
57
|
+
* The pipeline as a writing pass is handed it: {@link applySourceLineMutations}
|
|
58
|
+
* with the export's `MutablePropertyView` already bound
|
|
59
|
+
* (`step-export-contexts.ts`). Derived from the function rather than restated,
|
|
60
|
+
* so the injected form cannot drift from the real one.
|
|
61
|
+
*/
|
|
62
|
+
type BoundSourceLineMutations = (...args: WithoutView<Parameters<typeof applySourceLineMutations>>) => SourceLineMutations;
|
|
63
|
+
type WithoutView<T extends unknown[]> = T extends [MutablePropertyView | null, ...infer Rest] ? Rest : never;
|
|
64
|
+
/**
|
|
65
|
+
* Run the pipeline for a writing pass and report BOTH ways it can decline to
|
|
66
|
+
* write, into that pass's warnings.
|
|
67
|
+
*
|
|
68
|
+
* Two passes emit a source entity's defining line — the source-iteration pass
|
|
69
|
+
* and the type-object `HasPropertySets` rewrite that REPLACES it — and each
|
|
70
|
+
* needs the same pair: the per-attribute rejection (a REAL-typed slot handed a
|
|
71
|
+
* non-number) and the whole-record refusal ({@link SourceLineMutations.unreadable}).
|
|
72
|
+
* They were two identical blocks at the two call sites, which is one block per
|
|
73
|
+
* pass too many: a third pass copying one of them gets a report that is right
|
|
74
|
+
* about one channel and silent about the other, and silence is what #4125 is
|
|
75
|
+
* about. So the call and both reports are one thing here.
|
|
76
|
+
*/
|
|
77
|
+
export declare function applySourceLineMutationsReported(apply: BoundSourceLineMutations, warnings: string[], expressId: number, entityText: string, recordType: string, attributeMutations: Map<string, string> | undefined, sourceSchema: IfcSchemaVersion, overlayActive: boolean): SourceLineMutations;
|
|
78
|
+
export {};
|
|
49
79
|
//# sourceMappingURL=step-attribute-mutations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-attribute-mutations.d.ts","sourceRoot":"","sources":["../src/step-attribute-mutations.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"step-attribute-mutations.d.ts","sourceRoot":"","sources":["../src/step-attribute-mutations.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,mBAAmB,GAAG,IAAI,EACxC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACnD,YAAY,EAAE,gBAAgB,EAC9B,aAAa,EAAE,OAAO,EACtB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GACrD,mBAAmB,CA6ErB;AAED;;;;;GAKG;AACH,KAAK,wBAAwB,GAAG,CAC9B,GAAG,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,KAC9D,mBAAmB,CAAC;AACzB,KAAK,WAAW,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,mBAAmB,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GACzF,IAAI,GACJ,KAAK,CAAC;AAEV;;;;;;;;;;;;GAYG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,wBAAwB,EAC/B,QAAQ,EAAE,MAAM,EAAE,EAClB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACnD,YAAY,EAAE,gBAAgB,EAC9B,aAAa,EAAE,OAAO,GACrB,mBAAmB,CAkBrB"}
|
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
* pipeline is now `step-overlay-attribute-overrides.ts`, and the shared
|
|
15
15
|
* serializers are `step-attribute-serializers.ts`.
|
|
16
16
|
*/
|
|
17
|
-
import {
|
|
17
|
+
import { splitTopLevelStepArguments } from './step-argument-parser.js';
|
|
18
18
|
import { getRealTypedSlots } from './attribute-real-slots.js';
|
|
19
19
|
import { retypeStepLine } from './retype.js';
|
|
20
20
|
import { attrIndex, stepSourceSchema } from './subset-entity-reader.js';
|
|
21
21
|
import { serializeNamedAttribute, serializePositionalOverride } from './step-attribute-serializers.js';
|
|
22
|
+
import { unreadableRecordEditsDroppedWarning } from './step-export-types.js';
|
|
22
23
|
/**
|
|
23
24
|
* THE mutation pipeline for a line read out of the source buffer: retype,
|
|
24
25
|
* then named attribute edits, then positional edits.
|
|
@@ -47,8 +48,8 @@ import { serializeNamedAttribute, serializePositionalOverride } from './step-att
|
|
|
47
48
|
* The expressId is unchanged by all of this, so geometry / placement /
|
|
48
49
|
* representation and every IfcRel* reference (keyed by #id) carry over.
|
|
49
50
|
*
|
|
50
|
-
*
|
|
51
|
-
* operation change the line", measured across that operation alone. The count
|
|
51
|
+
* The three delivery flags report EFFECT, not intent — each is the answer to
|
|
52
|
+
* "did this operation change the line", measured across that operation alone. The count
|
|
52
53
|
* and the ledger are claims about the FILE, so an edit that resolves to the
|
|
53
54
|
* text already there has delivered nothing and must not be reported: retyping
|
|
54
55
|
* an entity to the class it already is, or writing a positional slot the token
|
|
@@ -62,6 +63,13 @@ import { serializeNamedAttribute, serializePositionalOverride } from './step-att
|
|
|
62
63
|
* two are nominated (their edits have no earlier nomination site); named
|
|
63
64
|
* attribute edits are nominated by the collection pass and `attributed` only
|
|
64
65
|
* settles their delivery.
|
|
66
|
+
*
|
|
67
|
+
* `unreadable` is the fourth field and answers a different question: not what
|
|
68
|
+
* this line carries, but whether the pipeline could read it at all. Every edit
|
|
69
|
+
* kind above writes a slot BY INDEX, so all of them refuse together on a record
|
|
70
|
+
* whose argument list does not scan — and three false delivery flags cannot say
|
|
71
|
+
* that, because a discarded edit sets them too. Both call sites turn it into a
|
|
72
|
+
* warning naming the entity (#4125).
|
|
65
73
|
*/
|
|
66
74
|
export function applySourceLineMutations(mutationView, expressId, entityText, recordType, attributeMutations, sourceSchema, overlayActive, onRejected) {
|
|
67
75
|
let text = entityText;
|
|
@@ -97,7 +105,68 @@ export function applySourceLineMutations(mutationView, expressId, entityText, re
|
|
|
97
105
|
text = applyPositionalMutations(text, positionals, workingType, sourceSchema);
|
|
98
106
|
positional = text !== beforePositionals;
|
|
99
107
|
}
|
|
100
|
-
|
|
108
|
+
// All three edit kinds above address this line's arguments BY INDEX, so all
|
|
109
|
+
// three refuse together when the argument list does not scan into slots —
|
|
110
|
+
// and all three then look exactly like an edit that resolved to the text
|
|
111
|
+
// already there. That is the failure this whole family is about, so the
|
|
112
|
+
// refusal is stated rather than left to be inferred from three false flags
|
|
113
|
+
// (#4125). Only ever set when an edit was actually asked for: a malformed
|
|
114
|
+
// record nobody edited has refused nothing.
|
|
115
|
+
//
|
|
116
|
+
// The three delivery flags are tested FIRST because any one of them being
|
|
117
|
+
// true already answers the question, without splitting the record a second
|
|
118
|
+
// time. Each of `retypeStepLine`, `applyAttributeMutations` and
|
|
119
|
+
// `applyPositionalMutations` returns its input UNCHANGED when it refuses, so
|
|
120
|
+
// a flag that is true means that writer replaced a slot, which means it
|
|
121
|
+
// scanned the argument list — over the same substring, between the same
|
|
122
|
+
// `indexOf('(')` and `lastIndexOf(');')` bounds `argumentListScans` uses. So
|
|
123
|
+
// the added conjuncts only ever skip a call that would have returned true;
|
|
124
|
+
// they cannot turn a refusal into a readable record.
|
|
125
|
+
const requested = typeMutation !== null
|
|
126
|
+
|| (attributeMutations?.size ?? 0) > 0
|
|
127
|
+
|| (positionals?.size ?? 0) > 0;
|
|
128
|
+
const unreadable = requested
|
|
129
|
+
&& !attributed
|
|
130
|
+
&& !retyped
|
|
131
|
+
&& !positional
|
|
132
|
+
&& !argumentListScans(entityText);
|
|
133
|
+
return { text, attributed, retyped, positional, unreadable };
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Run the pipeline for a writing pass and report BOTH ways it can decline to
|
|
137
|
+
* write, into that pass's warnings.
|
|
138
|
+
*
|
|
139
|
+
* Two passes emit a source entity's defining line — the source-iteration pass
|
|
140
|
+
* and the type-object `HasPropertySets` rewrite that REPLACES it — and each
|
|
141
|
+
* needs the same pair: the per-attribute rejection (a REAL-typed slot handed a
|
|
142
|
+
* non-number) and the whole-record refusal ({@link SourceLineMutations.unreadable}).
|
|
143
|
+
* They were two identical blocks at the two call sites, which is one block per
|
|
144
|
+
* pass too many: a third pass copying one of them gets a report that is right
|
|
145
|
+
* about one channel and silent about the other, and silence is what #4125 is
|
|
146
|
+
* about. So the call and both reports are one thing here.
|
|
147
|
+
*/
|
|
148
|
+
export function applySourceLineMutationsReported(apply, warnings, expressId, entityText, recordType, attributeMutations, sourceSchema, overlayActive) {
|
|
149
|
+
const mutated = apply(expressId, entityText, recordType, attributeMutations, sourceSchema, overlayActive, (attr, value) => warnings.push(`entity #${expressId}: attribute ${attr} not written - ` +
|
|
150
|
+
`${JSON.stringify(value)} is not a number and the slot is REAL-typed`));
|
|
151
|
+
if (mutated.unreadable) {
|
|
152
|
+
warnings.push(unreadableRecordEditsDroppedWarning(expressId, recordType));
|
|
153
|
+
}
|
|
154
|
+
return mutated;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Does this line's own argument list scan into slots?
|
|
158
|
+
*
|
|
159
|
+
* Scoped to the arguments deliberately. Text that is not a `#N=CLASS(...);`
|
|
160
|
+
* record at all is a different fact, and one every writer here already returns
|
|
161
|
+
* untouched without claiming anything; this answers only the question the
|
|
162
|
+
* by-index writers below actually ask.
|
|
163
|
+
*/
|
|
164
|
+
function argumentListScans(entityText) {
|
|
165
|
+
const openParen = entityText.indexOf('(');
|
|
166
|
+
const closeParen = entityText.lastIndexOf(');');
|
|
167
|
+
if (openParen < 0 || closeParen < openParen)
|
|
168
|
+
return true;
|
|
169
|
+
return splitTopLevelStepArguments(entityText.slice(openParen + 1, closeParen)) !== null;
|
|
101
170
|
}
|
|
102
171
|
/**
|
|
103
172
|
* Rewrite root IFC attributes directly on the original STEP entity line.
|
|
@@ -108,7 +177,15 @@ function applyAttributeMutations(entityText, entityType, attributeMutations, sch
|
|
|
108
177
|
if (openParen < 0 || closeParen < openParen) {
|
|
109
178
|
return entityText;
|
|
110
179
|
}
|
|
111
|
-
|
|
180
|
+
// Validating, not permissive. Every write below is BY INDEX into these
|
|
181
|
+
// parts, so parts that are not the record's slots put the value on another
|
|
182
|
+
// attribute and delete whatever was there, while `changed` still says the
|
|
183
|
+
// edit landed (#2470, #4125). A `null` refuses the whole line's named edits
|
|
184
|
+
// rather than handing back a success that did not happen; the caller reports
|
|
185
|
+
// it (see {@link applySourceLineMutations}).
|
|
186
|
+
const args = splitTopLevelStepArguments(entityText.slice(openParen + 1, closeParen));
|
|
187
|
+
if (args === null)
|
|
188
|
+
return entityText;
|
|
112
189
|
// A source line NEVER pads (unlike the overlay-created path): a short
|
|
113
190
|
// argument list here means the file speaks a different schema, and growing
|
|
114
191
|
// a record we did not author would corrupt it.
|
|
@@ -159,7 +236,11 @@ function applyPositionalMutations(entityText, positionals, entityType, schemaVer
|
|
|
159
236
|
const closeParen = entityText.lastIndexOf(');');
|
|
160
237
|
if (openParen < 0 || closeParen < openParen)
|
|
161
238
|
return entityText;
|
|
162
|
-
|
|
239
|
+
// Validating for the same reason as the named path above: `args[index] = …`
|
|
240
|
+
// is only an edit to attribute `index` when the parts ARE the record's slots.
|
|
241
|
+
const args = splitTopLevelStepArguments(entityText.slice(openParen + 1, closeParen));
|
|
242
|
+
if (args === null)
|
|
243
|
+
return entityText;
|
|
163
244
|
const realSlots = getRealTypedSlots(entityType, schemaVersion);
|
|
164
245
|
let changed = false;
|
|
165
246
|
for (const [index, value] of positionals) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-attribute-mutations.js","sourceRoot":"","sources":["../src/step-attribute-mutations.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"step-attribute-mutations.js","sourceRoot":"","sources":["../src/step-attribute-mutations.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAIxE,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAG7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,UAAU,wBAAwB,CACtC,YAAwC,EACxC,SAAiB,EACjB,UAAkB,EAClB,UAAkB,EAClB,kBAAmD,EACnD,YAA8B,EAC9B,a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,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skip a comment-delimiter-bounded region atomically, starting at the index
|
|
3
|
+
* of its opening `/` marker (caller has already checked `text[i] === '/' &&
|
|
4
|
+
* text[i + 1] === '*'`). Returns the index one past the region's end — the
|
|
5
|
+
* matching close marker, or end-of-text when unterminated — so its content
|
|
6
|
+
* (a comma, an unbalanced paren, an odd number of `'`) is skipped as one
|
|
7
|
+
* unit rather than read as argument-list structure. Shared by both
|
|
8
|
+
* `step-argument-parser.ts` splitters so the skip rule can't drift between
|
|
9
|
+
* them again (#4227: `splitTopLevelArgs` shipped with no comment handling
|
|
10
|
+
* at all while `splitTopLevelStepArguments` had this same logic inline).
|
|
11
|
+
*/
|
|
12
|
+
export declare function skipStepComment(text: string, i: number): number;
|
|
13
|
+
//# sourceMappingURL=step-comment-skip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-comment-skip.d.ts","sourceRoot":"","sources":["../src/step-comment-skip.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG/D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Skip a comment-delimiter-bounded region atomically, starting at the index
|
|
6
|
+
* of its opening `/` marker (caller has already checked `text[i] === '/' &&
|
|
7
|
+
* text[i + 1] === '*'`). Returns the index one past the region's end — the
|
|
8
|
+
* matching close marker, or end-of-text when unterminated — so its content
|
|
9
|
+
* (a comma, an unbalanced paren, an odd number of `'`) is skipped as one
|
|
10
|
+
* unit rather than read as argument-list structure. Shared by both
|
|
11
|
+
* `step-argument-parser.ts` splitters so the skip rule can't drift between
|
|
12
|
+
* them again (#4227: `splitTopLevelArgs` shipped with no comment handling
|
|
13
|
+
* at all while `splitTopLevelStepArguments` had this same logic inline).
|
|
14
|
+
*/
|
|
15
|
+
export function skipStepComment(text, i) {
|
|
16
|
+
const end = text.indexOf('*/', i + 2);
|
|
17
|
+
return end === -1 ? text.length : end + 2;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=step-comment-skip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-comment-skip.js","sourceRoot":"","sources":["../src/step-comment-skip.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,CAAS;IACrD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -202,6 +202,44 @@ export declare const relationshipWithheldWarning: (expressId: number, type: stri
|
|
|
202
202
|
* attribute, e.g. `IfcStyledItem.Item`, naming an entity this export omits).
|
|
203
203
|
*/
|
|
204
204
|
export declare const styleEntityWithheldWarning: (expressId: number, type: string) => string;
|
|
205
|
+
/**
|
|
206
|
+
* The edits queued for a source record were dropped because its own argument
|
|
207
|
+
* list could not be read as a list of slots.
|
|
208
|
+
*
|
|
209
|
+
* Said out loud, because the alternative was worse in both directions. Writing
|
|
210
|
+
* by index into parts a mis-scan produced lands the value on a different
|
|
211
|
+
* attribute and deletes what was there, while reporting success; refusing
|
|
212
|
+
* without saying so leaves an export that looks like it carried the edit. The
|
|
213
|
+
* usual cause is an undoubled apostrophe inside a string-typed attribute, which
|
|
214
|
+
* an authoring tool emits when it forgets to double one — two of those leave
|
|
215
|
+
* quote parity even and paren depth at zero, so nothing structural notices
|
|
216
|
+
* (#4125).
|
|
217
|
+
*
|
|
218
|
+
* It says what was DROPPED and nothing about what was written. It used to open
|
|
219
|
+
* "was written exactly as the source file has it", which is a claim this
|
|
220
|
+
* sentence is in no position to make: the pipeline that produces it runs before
|
|
221
|
+
* `writeSourceEntityLines` hands the record to `convertStepLine`, and a
|
|
222
|
+
* cross-schema export can rename the record's type, trim or pad its attribute
|
|
223
|
+
* list, replace it with an `IFCPROXY`, or drop it from the output entirely. So
|
|
224
|
+
* on exactly the path where a caller most needs to know what became of a
|
|
225
|
+
* dropped edit, the diagnostic was false (#4213).
|
|
226
|
+
*
|
|
227
|
+
* Buffering the report until the line's fate is known — the treatment
|
|
228
|
+
* `step-source-iteration.ts` already applies to the withholding branches — does
|
|
229
|
+
* not fit here. The refusal is produced one layer below the two writers, and
|
|
230
|
+
* the other of them (`step-property-sets.ts`'s type-object rewrite) never
|
|
231
|
+
* converts at all, so a message about the output would have to be assembled
|
|
232
|
+
* differently per caller for a fact neither caller is reporting. A sentence
|
|
233
|
+
* about the refusal is true on every path, which is what a shared message needs
|
|
234
|
+
* to be. It does not replace the dropped clause with a weaker one either — "the
|
|
235
|
+
* record keeps the values the source gave it" is false on the same conversion
|
|
236
|
+
* path, for the same reason.
|
|
237
|
+
*
|
|
238
|
+
* `type` is the class the SOURCE record carries, which is the class the dropped
|
|
239
|
+
* edits were queued against; it is not a claim about the class the export
|
|
240
|
+
* writes, which on that same conversion path can differ.
|
|
241
|
+
*/
|
|
242
|
+
export declare const unreadableRecordEditsDroppedWarning: (expressId: number, type: string) => string;
|
|
205
243
|
/**
|
|
206
244
|
* What `step-attribute-mutations.ts`'s `applySourceLineMutations` produced: the rewritten
|
|
207
245
|
* line, plus which edit kinds that rewrite actually delivered. The delivery
|
|
@@ -211,6 +249,19 @@ export declare const styleEntityWithheldWarning: (expressId: number, type: strin
|
|
|
211
249
|
*/
|
|
212
250
|
export type SourceLineMutations = SourceLineDelivery & {
|
|
213
251
|
text: string;
|
|
252
|
+
/**
|
|
253
|
+
* The line's argument list did not scan into slots, so NONE of the edits
|
|
254
|
+
* queued for it was applied and `text` is the source's own bytes.
|
|
255
|
+
*
|
|
256
|
+
* Separate from the three delivery flags because it answers a different
|
|
257
|
+
* question. Those say what this line carries; this says the pipeline refused
|
|
258
|
+
* to write it at all. Without it a refusal is indistinguishable from an edit
|
|
259
|
+
* that resolved to the text already there — three false flags either way —
|
|
260
|
+
* and writing by index into an argument list this scanner could not read is
|
|
261
|
+
* exactly how an edit lands on the wrong attribute while reporting success
|
|
262
|
+
* (#2470, #4125).
|
|
263
|
+
*/
|
|
264
|
+
unreadable: boolean;
|
|
214
265
|
};
|
|
215
266
|
/**
|
|
216
267
|
* The state one `export()` call shares across its seven phases.
|