Nick Shirokov
|
6e14f2502e
|
feat(skd-edit): empty parameter values, decimal/time/fix/composite
Brings skd-edit to parity with the skd-compile fixes from 449f814 / 0537410
/ ff2d851. Same helpers (Test-EmptyValue / Build-EmptyValueXml in ps1,
is_empty_value / build_empty_value_xml in py) shared by add-parameter,
modify-parameter (value=...), availableValues, add-dataParameter and
modify-dataParameter.
Behavior:
- Sentinel empty (null / "" / "_" / "null") serializes per declared type,
matching what 1C Designer writes — ref/no-type → xsi:nil, string →
xsi:type="xs:string" empty, date/time/decimal/boolean → typed zero,
StandardPeriod → Custom + zero dates, dataParameters → dcscor:value
xsi:nil="true". @valueList omits <value> entirely.
- Build-ValueTypeXml accepts bare decimal (10,2), decimal(N) (N,0),
string(N,fix) (AllowedLength=Fixed), time (DateFractions=Time), and
composite array of types.
- Parse-ParamShorthand / Parse-DataParamShorthand regex .+ → .* so a
trailing `=` is treated as the empty-value sentinel. New @valueList flag.
New test cases: empty-param-values-add / -modify / empty-dataparam-values.
Three outdated skd-edit snapshots regenerated to reflect upstream skd-compile
empty-value emission (rename-parameter, reorder-parameters,
conditional-appearance-v2).
Regression: 41/41 ps1 + 41/41 py runner; 41/41 verify-snapshots ps1 + py
(live load into 1С 8.3.24). skd-compile 23/23 and skd-validate 15/15
unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-20 13:38:52 +03:00 |
|