ranger-compiler 3.5.0 → 3.5.2
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/CHANGELOG.md +1160 -19
- package/LICENSE +3 -1
- package/README.md +124 -29
- package/dist/Lang.rgr +1188 -290
- package/dist/api.d.ts +2343 -879
- package/dist/api.js +79924 -56922
- package/dist/lib/JSON.rgr +102 -91
- package/dist/lib/Shell.rgr +4 -4
- package/dist/lib/apple/AppleToolchain.rgr +4 -4
- package/dist/lib/apple/README.md +5 -4
- package/dist/lib/apple/apple_test.rgr +1 -1
- package/dist/lib/core/README.md +1 -1
- package/dist/lib/evg/EVG.rgr +12 -0
- package/dist/lib/evg/EVGA11yFromTree.rgr +302 -0
- package/dist/lib/evg/EVGA11yTree.rgr +894 -0
- package/dist/lib/evg/EVGBox.rgr +267 -0
- package/dist/lib/evg/EVGBoxShorthandTest.rgr +220 -0
- package/dist/lib/evg/EVGCodepoint.rgr +316 -0
- package/dist/lib/evg/EVGColor.rgr +700 -0
- package/dist/lib/evg/EVGCommands.rgr +177 -0
- package/dist/lib/evg/EVGComponent.rgr +331 -0
- package/dist/lib/evg/EVGComponentTest.rgr +387 -0
- package/dist/lib/evg/EVGConnector.rgr +541 -0
- package/dist/lib/evg/EVGConnectorTest.rgr +306 -0
- package/dist/lib/evg/EVGDisplayList.rgr +4186 -0
- package/dist/lib/evg/EVGEasing.rgr +370 -0
- package/dist/lib/evg/EVGEffectTest.rgr +253 -0
- package/dist/lib/evg/EVGElement.rgr +4914 -0
- package/dist/lib/evg/EVGFixedTest.rgr +289 -0
- package/dist/lib/evg/EVGFlexRulesTest.rgr +317 -0
- package/dist/lib/evg/EVGFlexWrapTest.rgr +246 -0
- package/dist/lib/evg/EVGFling.rgr +244 -0
- package/dist/lib/evg/EVGFocus.rgr +400 -0
- package/dist/lib/evg/EVGFocusTest.rgr +399 -0
- package/dist/lib/evg/EVGGradient.rgr +322 -0
- package/dist/lib/evg/EVGGrapheme.rgr +190 -0
- package/dist/lib/evg/EVGGrid.rgr +975 -0
- package/dist/lib/evg/EVGHitTest.rgr +208 -0
- package/dist/lib/evg/EVGHoles.rgr +294 -0
- package/dist/lib/evg/EVGHostMeasurerTest.rgr +281 -0
- package/dist/lib/evg/EVGHostTextMeasurer.rgr +331 -0
- package/dist/lib/evg/EVGHostTree.rgr +834 -0
- package/dist/lib/evg/EVGHostTreeTest.rgr +447 -0
- package/dist/lib/evg/EVGImageDecode.rgr +117 -0
- package/dist/lib/evg/EVGImageMeasurer.rgr +86 -0
- package/dist/lib/evg/EVGInspect.rgr +883 -0
- package/dist/lib/evg/EVGInvalidateTest.rgr +432 -0
- package/dist/lib/evg/EVGJsonTest.rgr +535 -0
- package/dist/lib/evg/EVGLayout.rgr +4220 -0
- package/dist/lib/evg/EVGMeasure.rgr +1267 -0
- package/dist/lib/evg/EVGOverlayTest.rgr +626 -0
- package/dist/lib/evg/EVGPatch.rgr +1721 -0
- package/dist/lib/evg/EVGPatchTest.rgr +692 -0
- package/dist/lib/evg/EVGPopoverTest.rgr +395 -0
- package/dist/lib/evg/EVGReconcile.rgr +226 -0
- package/dist/lib/evg/EVGReconcileTest.rgr +421 -0
- package/dist/lib/evg/EVGReject.rgr +126 -0
- package/dist/lib/evg/EVGRelayoutTest.rgr +375 -0
- package/dist/lib/evg/EVGRtlLayoutTest.rgr +319 -0
- package/dist/lib/evg/EVGRuler.rgr +232 -0
- package/dist/lib/evg/EVGRulerTest.rgr +172 -0
- package/dist/lib/evg/EVGSelectChrome.rgr +178 -0
- package/dist/lib/evg/EVGStyleCacheTest.rgr +419 -0
- package/dist/lib/evg/EVGStyleSheet.rgr +2148 -0
- package/dist/lib/evg/EVGStyleStateTest.rgr +407 -0
- package/dist/lib/evg/EVGStyleVarTest.rgr +471 -0
- package/dist/lib/evg/EVGText.rgr +105 -0
- package/dist/lib/evg/EVGTextEngine.rgr +536 -0
- package/dist/lib/evg/EVGTextMeasurer.rgr +720 -0
- package/dist/lib/evg/EVGTimingTest.rgr +1417 -0
- package/dist/lib/evg/EVGToolbar.rgr +1369 -0
- package/dist/lib/evg/EVGTransition.rgr +728 -0
- package/dist/lib/evg/EVGTreeJson.rgr +721 -0
- package/dist/lib/evg/EVGUnit.rgr +554 -0
- package/dist/lib/evg/EVGViewportUnitTest.rgr +236 -0
- package/dist/lib/evg/EvgApp.rgr +189 -0
- package/dist/lib/evg/EvgBitmapTracer.rgr +4277 -0
- package/dist/lib/evg/EvgBitmapTracerTest.rgr +2119 -0
- package/dist/lib/evg/EvgHost.rgr +451 -0
- package/dist/lib/evg/EvgTest.rgr +91 -0
- package/dist/lib/evg/EvgTraceColor.rgr +236 -0
- package/dist/lib/evg/EvgTraceCurve.rgr +648 -0
- package/dist/lib/evg/EvgTraceFit.rgr +767 -0
- package/dist/lib/evg/EvgTracePath.rgr +435 -0
- package/dist/lib/evg/EvgTraceTypes.rgr +559 -0
- package/dist/lib/evg/EvgViewport.rgr +313 -0
- package/dist/lib/evg/FxDemoDoc.rgr +185 -0
- package/dist/lib/evg/HOSTS.md +227 -0
- package/dist/lib/evg/ISSUES.md +835 -0
- package/dist/lib/evg/PLAN_ACCESSIBILITY.md +650 -0
- package/dist/lib/evg/PLAN_CSS_LAYOUT_AND_FONTS.md +1124 -0
- package/dist/lib/evg/PLAN_EFFECTS.md +431 -0
- package/dist/lib/evg/PLAN_EVG.md +518 -0
- package/dist/lib/evg/PLAN_EVG_RENDERER.md +1674 -0
- package/dist/lib/evg/PLAN_INSPECTOR.md +788 -0
- package/dist/lib/evg/PLAN_LINKS_AND_FORMS.md +157 -0
- package/dist/lib/evg/PLAN_NATIVE_HOSTS.md +671 -0
- package/dist/lib/evg/PLAN_VECTOR_IR.md +664 -0
- package/dist/lib/evg/PLAN_VIEW_TRANSFORM.md +322 -0
- package/dist/lib/evg/PathBuilder.rgr +333 -0
- package/dist/lib/evg/README.md +1236 -0
- package/dist/lib/evg/SPEC.md +1252 -0
- package/dist/lib/evg/SVGPathParser.rgr +1199 -0
- package/dist/lib/evg/SvgParser.rgr +1736 -0
- package/dist/lib/evg/TODO_EVG_RENDERER.md +595 -0
- package/dist/lib/evg/VectorShapes.rgr +331 -0
- package/dist/lib/evg/VectorStroke.rgr +107 -0
- package/dist/lib/evg/VectorViewBox.rgr +380 -0
- package/dist/lib/evg/agent/README.md +290 -0
- package/dist/lib/evg/agent/evg_agent.rgr +899 -0
- package/dist/lib/evg/agent/fixtures/broken.evg.json +7 -0
- package/dist/lib/evg/agent/fixtures/card.evg.json +9 -0
- package/dist/lib/evg/agent/fixtures/connector.css +63 -0
- package/dist/lib/evg/agent/fixtures/connector.evg.json +14 -0
- package/dist/lib/evg/agent/fixtures/drawn.evg.json +129 -0
- package/dist/lib/evg/agent/fixtures/gradient.evg.json +4 -0
- package/dist/lib/evg/agent/fixtures/popover.css +99 -0
- package/dist/lib/evg/agent/fixtures/popover.evg.json +30 -0
- package/dist/lib/evg/agent/roundtrip.sh +74 -0
- package/dist/lib/evg/agent/smoke.sh +230 -0
- package/dist/lib/evg/android/README.md +97 -0
- package/dist/lib/evg/android/androidstubs/AndroidStubs.kt +175 -0
- package/dist/lib/evg/android/androidstubs/Annotation.kt +10 -0
- package/dist/lib/evg/android/androidstubs/App.kt +30 -0
- package/dist/lib/evg/android/androidstubs/Content.kt +41 -0
- package/dist/lib/evg/android/androidstubs/ContentRes.kt +12 -0
- package/dist/lib/evg/android/androidstubs/InputMethod.kt +46 -0
- package/dist/lib/evg/android/androidstubs/Net.kt +6 -0
- package/dist/lib/evg/android/androidstubs/Os.kt +30 -0
- package/dist/lib/evg/android/androidstubs/Util.kt +15 -0
- package/dist/lib/evg/android/androidstubs/View.kt +113 -0
- package/dist/lib/evg/android/androidstubs/Widget.kt +16 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/AndroidEvgSurface.kt +323 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/AndroidTextMeasurer.kt +56 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/RippleEffect.kt +262 -0
- package/dist/lib/evg/android/src/awt/kotlin/fi/ranger/evg/AwtEvgSurface.kt +238 -0
- package/dist/lib/evg/android/src/awt/kotlin/fi/ranger/evg/AwtTextMeasurer.kt +85 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgEngineThread.kt +115 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgPainter.kt +231 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgSurface.kt +117 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/RecordingSurface.kt +94 -0
- package/dist/lib/evg/apple/README.md +128 -0
- package/dist/lib/evg/apple/Sources/CoreGraphicsEvgSurface.swift +329 -0
- package/dist/lib/evg/apple/Sources/CoreTextMeasurer.swift +70 -0
- package/dist/lib/evg/apple/Sources/EvgEngineQueue.swift +105 -0
- package/dist/lib/evg/apple/Sources/EvgPainter.swift +225 -0
- package/dist/lib/evg/apple/Sources/EvgSurface.swift +163 -0
- package/dist/lib/evg/apple/Sources/RecordingSurface.swift +110 -0
- package/dist/lib/evg/bench/EvgLayoutBench.rgr +34 -0
- package/dist/lib/evg/bench/README.md +64 -0
- package/dist/lib/evg/bench/layout-bench.mjs +316 -0
- package/dist/lib/evg/bench/layout-cases.mjs +510 -0
- package/dist/lib/evg/bench/layout-conformance.mjs +254 -0
- package/dist/lib/evg/bin/.gitignore +17 -0
- package/dist/lib/evg/evg_test.rgr +313 -0
- package/dist/lib/evg/gl/README.md +198 -0
- package/dist/lib/evg/gl/a11y-paint-check.mjs +73 -0
- package/dist/lib/evg/gl/blur-check.mjs +399 -0
- package/dist/lib/evg/gl/boxmodel.json +1 -0
- package/dist/lib/evg/gl/demo.html +46 -0
- package/dist/lib/evg/gl/effect-presets.css +285 -0
- package/dist/lib/evg/gl/effect-presets.js +63 -0
- package/dist/lib/evg/gl/effect-shots.mjs +135 -0
- package/dist/lib/evg/gl/evg-a11y.js +566 -0
- package/dist/lib/evg/gl/evg-binary.js +160 -0
- package/dist/lib/evg/gl/evg-engine.js +296 -0
- package/dist/lib/evg/gl/evg-fx.js +237 -0
- package/dist/lib/evg/gl/evg-gestures.js +209 -0
- package/dist/lib/evg/gl/evg-list.js +167 -0
- package/dist/lib/evg/gl/evg-measure.js +186 -0
- package/dist/lib/evg/gl/evg-textinput.js +303 -0
- package/dist/lib/evg/gl/evg-view.js +144 -0
- package/dist/lib/evg/gl/evg-webgl.js +3942 -0
- package/dist/lib/evg/gl/fx-check.mjs +998 -0
- package/dist/lib/evg/gl/fx-demo.html +166 -0
- package/dist/lib/evg/gl/fx-demo.js +2 -0
- package/dist/lib/evg/gl/fx-serve.mjs +47 -0
- package/dist/lib/evg/gl/gestures-check.mjs +189 -0
- package/dist/lib/evg/gl/list-binary-check.mjs +152 -0
- package/dist/lib/evg/gl/measure-check.mjs +135 -0
- package/dist/lib/evg/gl/rotation-check.mjs +207 -0
- package/dist/lib/evg/gl/shift-check.mjs +113 -0
- package/dist/lib/evg/gl/stroke-check.mjs +168 -0
- package/dist/lib/evg/gl/text-snap-check.mjs +139 -0
- package/dist/lib/evg/gl/view-check.mjs +343 -0
- package/dist/lib/evg/gl/view-policy-check.mjs +184 -0
- package/dist/lib/evg/html/evg-dom.js +318 -0
- package/dist/lib/evg/html/evg-html.js +600 -0
- package/dist/lib/evg/inspect/README.md +415 -0
- package/dist/lib/evg/inspect/browser-smoke.mjs +115 -0
- package/dist/lib/evg/inspect/evg-inspect.js +947 -0
- package/dist/lib/evg/inspect/shots/css.png +0 -0
- package/dist/lib/evg/inspect/shots/dashboard.png +0 -0
- package/dist/lib/evg/inspect/shots/pptx-slide.png +0 -0
- package/dist/lib/evg/inspect/shots/state.png +0 -0
- package/dist/lib/evg/inspect/shots.mjs +226 -0
- package/dist/lib/evg/oracle/css-blur.json +576 -0
- package/dist/lib/evg/oracle/css-box.json +157 -0
- package/dist/lib/evg/oracle/css-timing.json +709 -0
- package/dist/lib/evg/oracle/css_blur_oracle.mjs +529 -0
- package/dist/lib/evg/oracle/css_box_oracle.mjs +106 -0
- package/dist/lib/evg/oracle/css_timing_oracle.mjs +389 -0
- package/dist/lib/evg/original/EVGColor.clj +310 -0
- package/dist/lib/evg/original/EVGColorContext.rgr +178 -0
- package/dist/lib/evg/original/SVGPath.rgr +627 -0
- package/dist/lib/evg/original/Vec2.crgr +103 -0
- package/dist/lib/evg/ranger.json +9 -0
- package/dist/lib/evg/showcase/README.md +246 -0
- package/dist/lib/evg/showcase/assets/emblem.svg +30 -0
- package/dist/lib/evg/showcase/assets/rosette.svg +22 -0
- package/dist/lib/evg/showcase/build.mjs +651 -0
- package/dist/lib/evg/showcase/pages/album.tsx +30 -0
- package/dist/lib/evg/showcase/pages/boxmodel.tsx +37 -0
- package/dist/lib/evg/showcase/pages/cards.tsx +41 -0
- package/dist/lib/evg/showcase/pages/chart_api.tsx +170 -0
- package/dist/lib/evg/showcase/pages/charts.tsx +219 -0
- package/dist/lib/evg/showcase/pages/drawing.tsx +160 -0
- package/dist/lib/evg/showcase/pages/emoji.tsx +91 -0
- package/dist/lib/evg/showcase/pages/flex.tsx +46 -0
- package/dist/lib/evg/showcase/pages/more.tsx +332 -0
- package/dist/lib/evg/showcase/pages/plots.tsx +262 -0
- package/dist/lib/evg/showcase/pages/svg.tsx +63 -0
- package/dist/lib/evg/showcase/pages/tables.tsx +209 -0
- package/dist/lib/evg/showcase/pages/typography.tsx +43 -0
- package/dist/lib/evg/showcase/pages/units.tsx +35 -0
- package/dist/lib/evg/showcase/pages/variants.tsx +233 -0
- package/dist/lib/evg/showcase/pages/vector.tsx +75 -0
- package/dist/lib/evg/showcase/pages/views.tsx +223 -0
- package/dist/lib/evg/showcase/tests/chart_api_smoke.mjs +339 -0
- package/dist/lib/evg/showcase/tests/gl_smoke.mjs +125 -0
- package/dist/lib/evg/showcase/themes/chart_api-default.css +15 -0
- package/dist/lib/evg/showcase/themes/charts-default.css +29 -0
- package/dist/lib/evg/showcase/themes/drawing-default.css +35 -0
- package/dist/lib/evg/showcase/themes/more-default.css +128 -0
- package/dist/lib/evg/showcase/themes/plots-default.css +18 -0
- package/dist/lib/evg/showcase/themes/showcase.css +508 -0
- package/dist/lib/evg/showcase/themes/tables-default.css +123 -0
- package/dist/lib/evg/showcase/themes/variants-default.css +15 -0
- package/dist/lib/evg/showcase/themes/views-default.css +15 -0
- package/dist/lib/evg/tools/bench_vs_potrace.mjs +290 -0
- package/dist/lib/evg/tools/evg_image_tool.rgr +488 -0
- package/dist/lib/evg/tools/evg_trace_bench.rgr +114 -0
- package/dist/lib/evg/tools/evg_trace_cli.rgr +662 -0
- package/dist/lib/evg/tools/evg_trace_cpp_bench.rgr +83 -0
- package/dist/lib/evg/tools/run_trace_bench.sh +74 -0
- package/dist/lib/evg/tools/run_trace_cli_smoke.sh +128 -0
- package/dist/lib/evg/web/responsive/EvgResponsiveCheck.rgr +271 -0
- package/dist/lib/evg/web/responsive/EvgResponsiveDemo.rgr +531 -0
- package/dist/lib/evg/web/responsive/README.md +97 -0
- package/dist/lib/evg/web/responsive/build.mjs +90 -0
- package/dist/lib/evg/web/responsive/dom-check.mjs +169 -0
- package/dist/lib/evg/web/responsive/index.html +177 -0
- package/dist/lib/evg/web/responsive/smoke.mjs +221 -0
- package/dist/lib/evg/web/tools/assets-client.mjs +95 -0
- package/dist/lib/evg/web/tools/boot-bench.mjs +189 -0
- package/dist/lib/evg/web/tools/inline-assets.mjs +119 -0
- package/dist/lib/evg/web/tools/minify.mjs +60 -0
- package/dist/lib/evg/web/tracer/build.mjs +87 -0
- package/dist/lib/evg/web/tracer/index.html +2805 -0
- package/dist/lib/evg/web/tracer/sample.png +0 -0
- package/dist/lib/evg/web/tracer/smoke.mjs +1162 -0
- package/dist/lib/evgr/Cargo.lock +21 -0
- package/dist/lib/evgr/Cargo.toml +19 -0
- package/dist/lib/evgr/README.md +140 -0
- package/dist/lib/evgr/bench/NativeBench.rgr +246 -0
- package/dist/lib/evgr/bench/compare.mjs +252 -0
- package/dist/lib/evgr/bench/speed.mjs +277 -0
- package/dist/lib/evgr/bin/.gitignore +3 -0
- package/dist/lib/evgr/src/bin/bench.rs +106 -0
- package/dist/lib/evgr/src/bin/smoke.rs +13 -0
- package/dist/lib/evgr/src/grid.rs +730 -0
- package/dist/lib/evgr/src/lib.rs +1003 -0
- package/dist/lib/evgr/src/style.rs +468 -0
- package/dist/lib/evgr/src/text.rs +83 -0
- package/dist/lib/image/BitReader.rgr +171 -0
- package/dist/lib/image/Buffer.rgr +173 -0
- package/dist/lib/image/DCT.rgr +283 -0
- package/dist/lib/image/Deflate.rgr +339 -0
- package/dist/lib/image/HuffmanDecoder.rgr +181 -0
- package/dist/lib/image/ImageBuffer.rgr +706 -0
- package/dist/lib/image/JPEGDecoder.rgr +808 -0
- package/dist/lib/image/PNGDecoder.rgr +544 -0
- package/dist/lib/image/PNGEncoder.rgr +388 -0
- package/dist/lib/image/PPMImage.rgr +224 -0
- package/dist/lib/image/ProgressiveJPEGDecoder.rgr +1154 -0
- package/dist/lib/image/README.md +33 -0
- package/dist/lib/image/RasterBuffer.rgr +294 -0
- package/dist/lib/image/VP8BoolDecoder.rgr +163 -0
- package/dist/lib/image/WebPDecoder.rgr +433 -0
- package/dist/lib/image/WebPLossless.rgr +1035 -0
- package/dist/lib/image/WebPLossy.rgr +1929 -0
- package/dist/lib/image/ranger.json +9 -0
- package/dist/lib/image/testdata/webp/anim_2f_24x16.webp +0 -0
- package/dist/lib/image/testdata/webp/fixtures.txt +33 -0
- package/dist/lib/image/testdata/webp/gen_fixtures.py +261 -0
- package/dist/lib/image/testdata/webp/ll_1x1.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_alpha_29x21.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_gradient_64x64.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_meta_32x32.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_noise_17x9.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal11_23x11.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal2_19x7.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal40_16x16.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal4_13x5.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_photo_40x30.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_predictors_64x32.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_1x1.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f0_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f1_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f2_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f3_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f0_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f1_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f2_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f3_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alpha_33x17.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_exif_15x11.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_i16_96x80.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_nofilter_24x20.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_odd_17x9.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_photo_48x40.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_q100_20x18.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_sharp_40x36.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_simple_filter_33x31.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_vpx_parts8_37x45.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_vpx_skip_96x80.webp +0 -0
- package/dist/lib/image/tests/WebPDecodeTool.rgr +81 -0
- package/dist/lib/image/tests/WebPDecoderTest.rgr +1162 -0
- package/dist/lib/image/tests/run_webp_tests.sh +39 -0
- package/dist/lib/rust/RsJson.rgr +468 -0
- package/dist/lib/rust/RsPrelude.rgr +1663 -0
- package/dist/lib/shell_test.rgr +7 -7
- package/dist/lib/stdlib.rgr +21 -5
- package/dist/lib/zip/ranger.json +6 -0
- package/dist/rgrc.js +87318 -67610
- package/package.json +1010 -1040
- package/dist/README.md +0 -117
- package/dist/package.json +0 -47
package/dist/lib/JSON.rgr
CHANGED
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
; it, both spelled in full so that no `use` line is needed.
|
|
22
22
|
systemclass JSONDataObject {
|
|
23
23
|
es6 Object
|
|
24
|
-
|
|
24
|
+
; no (imp): org.json is not on the classpath, and the Java writer emits
|
|
25
|
+
; JSONObject.java / JSONArray.java / RgJson.java itself when the program
|
|
26
|
+
; uses JSON -- the same reason Kotlin carries a polyfill below
|
|
27
|
+
java7 JSONObject
|
|
25
28
|
kotlin JSONObject
|
|
26
29
|
go "map[string]interface{}"
|
|
27
30
|
swift3 '[String:Any]'
|
|
@@ -35,7 +38,7 @@ systemclass JSONDataObject {
|
|
|
35
38
|
|
|
36
39
|
systemclass JSONArrayObject {
|
|
37
40
|
es6 JSONArrayObject2
|
|
38
|
-
java7 JSONArray
|
|
41
|
+
java7 JSONArray
|
|
39
42
|
kotlin JSONArray
|
|
40
43
|
go "[]interface{}"
|
|
41
44
|
swift3 '[Any]'
|
|
@@ -385,7 +388,7 @@ inline std::string rg_json_arr_to_string(const rg_json_arr& a) { std::string out
|
|
|
385
388
|
es6 (
|
|
386
389
|
"console.log(JSON.stringify(" (e 1) "));" nl
|
|
387
390
|
)
|
|
388
|
-
java7 @macro(true) ("print (to_string " (e 1) " )"
|
|
391
|
+
java7 @macro(true) ("print (to_string " (e 1) " )")
|
|
389
392
|
python ( "print(json.dumps(" (e 1) "))" (imp "json") )
|
|
390
393
|
rust @macro(true) ("print (to_string " (e 1) " )")
|
|
391
394
|
}
|
|
@@ -654,6 +657,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
654
657
|
return rg_json_arr();
|
|
655
658
|
}
|
|
656
659
|
")
|
|
660
|
+
(imp "<optional>")
|
|
657
661
|
(create_polyfill "
|
|
658
662
|
inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string& k) {
|
|
659
663
|
if (!o) { return nullptr; }
|
|
@@ -662,10 +666,14 @@ inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string&
|
|
|
662
666
|
}
|
|
663
667
|
return nullptr;
|
|
664
668
|
}
|
|
665
|
-
|
|
669
|
+
// getStr is declared optional, and every other target answers null for a key
|
|
670
|
+
// that is absent or not a string. Returning a bare std::string made that the
|
|
671
|
+
// empty string, which is a value.
|
|
672
|
+
inline std::optional<std::string> rg_json_get_str(const rg_json_obj& o, const std::string& k) {
|
|
673
|
+
std::optional<std::string> res;
|
|
666
674
|
const rg_json_val* v = rg_json_find(o, k);
|
|
667
|
-
if (v && std::holds_alternative<std::string>(*v)) {
|
|
668
|
-
return
|
|
675
|
+
if (v && std::holds_alternative<std::string>(*v)) { res = std::get<std::string>(*v); }
|
|
676
|
+
return res;
|
|
669
677
|
}
|
|
670
678
|
inline bool rg_json_get_bool(const rg_json_obj& o, const std::string& k) {
|
|
671
679
|
const rg_json_val* v = rg_json_find(o, k);
|
|
@@ -1176,6 +1184,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
1176
1184
|
return rg_json_arr();
|
|
1177
1185
|
}
|
|
1178
1186
|
")
|
|
1187
|
+
(imp "<optional>")
|
|
1179
1188
|
(create_polyfill "
|
|
1180
1189
|
inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string& k) {
|
|
1181
1190
|
if (!o) { return nullptr; }
|
|
@@ -1184,10 +1193,14 @@ inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string&
|
|
|
1184
1193
|
}
|
|
1185
1194
|
return nullptr;
|
|
1186
1195
|
}
|
|
1187
|
-
|
|
1196
|
+
// getStr is declared optional, and every other target answers null for a key
|
|
1197
|
+
// that is absent or not a string. Returning a bare std::string made that the
|
|
1198
|
+
// empty string, which is a value.
|
|
1199
|
+
inline std::optional<std::string> rg_json_get_str(const rg_json_obj& o, const std::string& k) {
|
|
1200
|
+
std::optional<std::string> res;
|
|
1188
1201
|
const rg_json_val* v = rg_json_find(o, k);
|
|
1189
|
-
if (v && std::holds_alternative<std::string>(*v)) {
|
|
1190
|
-
return
|
|
1202
|
+
if (v && std::holds_alternative<std::string>(*v)) { res = std::get<std::string>(*v); }
|
|
1203
|
+
return res;
|
|
1191
1204
|
}
|
|
1192
1205
|
inline bool rg_json_get_bool(const rg_json_obj& o, const std::string& k) {
|
|
1193
1206
|
const rg_json_val* v = rg_json_find(o, k);
|
|
@@ -1205,43 +1218,23 @@ inline rg_json_arr rg_json_get_arr(const rg_json_obj& o, const std::string& k) {
|
|
|
1205
1218
|
return rg_json_arr();
|
|
1206
1219
|
}
|
|
1207
1220
|
")
|
|
1221
|
+
(imp "<optional>")
|
|
1208
1222
|
(create_polyfill "
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
public:
|
|
1212
|
-
// has_value has to start false: cpp_str_to_int and its siblings leave the
|
|
1213
|
-
// field untouched when the conversion throws, and an indeterminate bool
|
|
1214
|
-
// made a failed str2int read back as a value on the C++ target.
|
|
1215
|
-
bool has_value = false;
|
|
1216
|
-
T value = T();
|
|
1217
|
-
r_optional_primitive<T> & operator=(const r_optional_primitive<T> & rhs) {
|
|
1218
|
-
has_value = rhs.has_value;
|
|
1219
|
-
value = rhs.value;
|
|
1220
|
-
return *this;
|
|
1221
|
-
}
|
|
1222
|
-
r_optional_primitive<T> & operator=(const T a_value) {
|
|
1223
|
-
has_value = true;
|
|
1224
|
-
value = a_value;
|
|
1225
|
-
return *this;
|
|
1226
|
-
}
|
|
1227
|
-
};
|
|
1228
|
-
")
|
|
1229
|
-
(create_polyfill "
|
|
1230
|
-
inline r_optional_primitive<int> rg_json_get_int(const rg_json_obj& o, const std::string& k) {
|
|
1231
|
-
r_optional_primitive<int> res;
|
|
1223
|
+
inline std::optional<int> rg_json_get_int(const rg_json_obj& o, const std::string& k) {
|
|
1224
|
+
std::optional<int> res;
|
|
1232
1225
|
const rg_json_val* v = rg_json_find(o, k);
|
|
1233
1226
|
if (v) {
|
|
1234
|
-
if (std::holds_alternative<int>(*v)) { res
|
|
1235
|
-
else if (std::holds_alternative<double>(*v)) { res
|
|
1227
|
+
if (std::holds_alternative<int>(*v)) { res = std::get<int>(*v); }
|
|
1228
|
+
else if (std::holds_alternative<double>(*v)) { res = (int)std::get<double>(*v); }
|
|
1236
1229
|
}
|
|
1237
1230
|
return res;
|
|
1238
1231
|
}
|
|
1239
|
-
inline
|
|
1240
|
-
|
|
1232
|
+
inline std::optional<double> rg_json_get_double(const rg_json_obj& o, const std::string& k) {
|
|
1233
|
+
std::optional<double> res;
|
|
1241
1234
|
const rg_json_val* v = rg_json_find(o, k);
|
|
1242
1235
|
if (v) {
|
|
1243
|
-
if (std::holds_alternative<double>(*v)) { res
|
|
1244
|
-
else if (std::holds_alternative<int>(*v)) { res
|
|
1236
|
+
if (std::holds_alternative<double>(*v)) { res = std::get<double>(*v); }
|
|
1237
|
+
else if (std::holds_alternative<int>(*v)) { res = (double)std::get<int>(*v); }
|
|
1245
1238
|
}
|
|
1246
1239
|
return res;
|
|
1247
1240
|
}
|
|
@@ -1567,6 +1560,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
1567
1560
|
return rg_json_arr();
|
|
1568
1561
|
}
|
|
1569
1562
|
")
|
|
1563
|
+
(imp "<optional>")
|
|
1570
1564
|
(create_polyfill "
|
|
1571
1565
|
inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string& k) {
|
|
1572
1566
|
if (!o) { return nullptr; }
|
|
@@ -1575,10 +1569,14 @@ inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string&
|
|
|
1575
1569
|
}
|
|
1576
1570
|
return nullptr;
|
|
1577
1571
|
}
|
|
1578
|
-
|
|
1572
|
+
// getStr is declared optional, and every other target answers null for a key
|
|
1573
|
+
// that is absent or not a string. Returning a bare std::string made that the
|
|
1574
|
+
// empty string, which is a value.
|
|
1575
|
+
inline std::optional<std::string> rg_json_get_str(const rg_json_obj& o, const std::string& k) {
|
|
1576
|
+
std::optional<std::string> res;
|
|
1579
1577
|
const rg_json_val* v = rg_json_find(o, k);
|
|
1580
|
-
if (v && std::holds_alternative<std::string>(*v)) {
|
|
1581
|
-
return
|
|
1578
|
+
if (v && std::holds_alternative<std::string>(*v)) { res = std::get<std::string>(*v); }
|
|
1579
|
+
return res;
|
|
1582
1580
|
}
|
|
1583
1581
|
inline bool rg_json_get_bool(const rg_json_obj& o, const std::string& k) {
|
|
1584
1582
|
const rg_json_val* v = rg_json_find(o, k);
|
|
@@ -1596,43 +1594,23 @@ inline rg_json_arr rg_json_get_arr(const rg_json_obj& o, const std::string& k) {
|
|
|
1596
1594
|
return rg_json_arr();
|
|
1597
1595
|
}
|
|
1598
1596
|
")
|
|
1597
|
+
(imp "<optional>")
|
|
1599
1598
|
(create_polyfill "
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
public:
|
|
1603
|
-
// has_value has to start false: cpp_str_to_int and its siblings leave the
|
|
1604
|
-
// field untouched when the conversion throws, and an indeterminate bool
|
|
1605
|
-
// made a failed str2int read back as a value on the C++ target.
|
|
1606
|
-
bool has_value = false;
|
|
1607
|
-
T value = T();
|
|
1608
|
-
r_optional_primitive<T> & operator=(const r_optional_primitive<T> & rhs) {
|
|
1609
|
-
has_value = rhs.has_value;
|
|
1610
|
-
value = rhs.value;
|
|
1611
|
-
return *this;
|
|
1612
|
-
}
|
|
1613
|
-
r_optional_primitive<T> & operator=(const T a_value) {
|
|
1614
|
-
has_value = true;
|
|
1615
|
-
value = a_value;
|
|
1616
|
-
return *this;
|
|
1617
|
-
}
|
|
1618
|
-
};
|
|
1619
|
-
")
|
|
1620
|
-
(create_polyfill "
|
|
1621
|
-
inline r_optional_primitive<int> rg_json_get_int(const rg_json_obj& o, const std::string& k) {
|
|
1622
|
-
r_optional_primitive<int> res;
|
|
1599
|
+
inline std::optional<int> rg_json_get_int(const rg_json_obj& o, const std::string& k) {
|
|
1600
|
+
std::optional<int> res;
|
|
1623
1601
|
const rg_json_val* v = rg_json_find(o, k);
|
|
1624
1602
|
if (v) {
|
|
1625
|
-
if (std::holds_alternative<int>(*v)) { res
|
|
1626
|
-
else if (std::holds_alternative<double>(*v)) { res
|
|
1603
|
+
if (std::holds_alternative<int>(*v)) { res = std::get<int>(*v); }
|
|
1604
|
+
else if (std::holds_alternative<double>(*v)) { res = (int)std::get<double>(*v); }
|
|
1627
1605
|
}
|
|
1628
1606
|
return res;
|
|
1629
1607
|
}
|
|
1630
|
-
inline
|
|
1631
|
-
|
|
1608
|
+
inline std::optional<double> rg_json_get_double(const rg_json_obj& o, const std::string& k) {
|
|
1609
|
+
std::optional<double> res;
|
|
1632
1610
|
const rg_json_val* v = rg_json_find(o, k);
|
|
1633
1611
|
if (v) {
|
|
1634
|
-
if (std::holds_alternative<double>(*v)) { res
|
|
1635
|
-
else if (std::holds_alternative<int>(*v)) { res
|
|
1612
|
+
if (std::holds_alternative<double>(*v)) { res = std::get<double>(*v); }
|
|
1613
|
+
else if (std::holds_alternative<int>(*v)) { res = (double)std::get<int>(*v); }
|
|
1636
1614
|
}
|
|
1637
1615
|
return res;
|
|
1638
1616
|
}
|
|
@@ -1954,6 +1932,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
1954
1932
|
return rg_json_arr();
|
|
1955
1933
|
}
|
|
1956
1934
|
")
|
|
1935
|
+
(imp "<optional>")
|
|
1957
1936
|
(create_polyfill "
|
|
1958
1937
|
inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string& k) {
|
|
1959
1938
|
if (!o) { return nullptr; }
|
|
@@ -1962,10 +1941,14 @@ inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string&
|
|
|
1962
1941
|
}
|
|
1963
1942
|
return nullptr;
|
|
1964
1943
|
}
|
|
1965
|
-
|
|
1944
|
+
// getStr is declared optional, and every other target answers null for a key
|
|
1945
|
+
// that is absent or not a string. Returning a bare std::string made that the
|
|
1946
|
+
// empty string, which is a value.
|
|
1947
|
+
inline std::optional<std::string> rg_json_get_str(const rg_json_obj& o, const std::string& k) {
|
|
1948
|
+
std::optional<std::string> res;
|
|
1966
1949
|
const rg_json_val* v = rg_json_find(o, k);
|
|
1967
|
-
if (v && std::holds_alternative<std::string>(*v)) {
|
|
1968
|
-
return
|
|
1950
|
+
if (v && std::holds_alternative<std::string>(*v)) { res = std::get<std::string>(*v); }
|
|
1951
|
+
return res;
|
|
1969
1952
|
}
|
|
1970
1953
|
inline bool rg_json_get_bool(const rg_json_obj& o, const std::string& k) {
|
|
1971
1954
|
const rg_json_val* v = rg_json_find(o, k);
|
|
@@ -2252,7 +2235,14 @@ List<dynamic>? rg_json_as_arr(dynamic v) {
|
|
|
2252
2235
|
}
|
|
2253
2236
|
")
|
|
2254
2237
|
)
|
|
2255
|
-
cpp ( "rg_json_get_obj(" (e 1) ", " (e 2) ")"
|
|
2238
|
+
cpp ( "rg_json_opt(rg_json_get_obj(" (e 1) ", " (e 2) ")" ")" (imp "<optional>") (create_polyfill "
|
|
2239
|
+
// an absent JSON object or array is the empty pointer; as an optional it is
|
|
2240
|
+
// std::nullopt, so has_value() tells a missing key from a present one
|
|
2241
|
+
template <class P> std::optional<P> rg_json_opt(const P & p) {
|
|
2242
|
+
if (p) { return p; }
|
|
2243
|
+
return std::nullopt;
|
|
2244
|
+
}
|
|
2245
|
+
")
|
|
2256
2246
|
(create_polyfill "
|
|
2257
2247
|
#include <memory>
|
|
2258
2248
|
#include <string>
|
|
@@ -2289,6 +2279,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
2289
2279
|
return rg_json_arr();
|
|
2290
2280
|
}
|
|
2291
2281
|
")
|
|
2282
|
+
(imp "<optional>")
|
|
2292
2283
|
(create_polyfill "
|
|
2293
2284
|
inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string& k) {
|
|
2294
2285
|
if (!o) { return nullptr; }
|
|
@@ -2297,10 +2288,14 @@ inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string&
|
|
|
2297
2288
|
}
|
|
2298
2289
|
return nullptr;
|
|
2299
2290
|
}
|
|
2300
|
-
|
|
2291
|
+
// getStr is declared optional, and every other target answers null for a key
|
|
2292
|
+
// that is absent or not a string. Returning a bare std::string made that the
|
|
2293
|
+
// empty string, which is a value.
|
|
2294
|
+
inline std::optional<std::string> rg_json_get_str(const rg_json_obj& o, const std::string& k) {
|
|
2295
|
+
std::optional<std::string> res;
|
|
2301
2296
|
const rg_json_val* v = rg_json_find(o, k);
|
|
2302
|
-
if (v && std::holds_alternative<std::string>(*v)) {
|
|
2303
|
-
return
|
|
2297
|
+
if (v && std::holds_alternative<std::string>(*v)) { res = std::get<std::string>(*v); }
|
|
2298
|
+
return res;
|
|
2304
2299
|
}
|
|
2305
2300
|
inline bool rg_json_get_bool(const rg_json_obj& o, const std::string& k) {
|
|
2306
2301
|
const rg_json_val* v = rg_json_find(o, k);
|
|
@@ -2326,7 +2321,7 @@ inline rg_json_arr rg_json_get_arr(const rg_json_obj& o, const std::string& k) {
|
|
|
2326
2321
|
swift3 ( (e 1) '[' (e 2) '] as? [String:Any] ')
|
|
2327
2322
|
swift6 ( (e 1) '[' (e 2) '] as? [String:Any] ')
|
|
2328
2323
|
ranger ( '(getObject ' (e 1) ' ' (e 2) ')')
|
|
2329
|
-
java7 ( "__getJSONObj(" (e 1) ", " (e 2) " )"
|
|
2324
|
+
java7 ( "__getJSONObj(" (e 1) ", " (e 2) " )"
|
|
2330
2325
|
|
|
2331
2326
|
(create_polyfill '
|
|
2332
2327
|
static JSONObject __getJSONObj(JSONObject o, String item)
|
|
@@ -2605,7 +2600,14 @@ List<dynamic>? rg_json_as_arr(dynamic v) {
|
|
|
2605
2600
|
}
|
|
2606
2601
|
")
|
|
2607
2602
|
)
|
|
2608
|
-
cpp ( "rg_json_get_arr(" (e 1) ", " (e 2) ")"
|
|
2603
|
+
cpp ( "rg_json_opt(rg_json_get_arr(" (e 1) ", " (e 2) ")" ")" (imp "<optional>") (create_polyfill "
|
|
2604
|
+
// an absent JSON object or array is the empty pointer; as an optional it is
|
|
2605
|
+
// std::nullopt, so has_value() tells a missing key from a present one
|
|
2606
|
+
template <class P> std::optional<P> rg_json_opt(const P & p) {
|
|
2607
|
+
if (p) { return p; }
|
|
2608
|
+
return std::nullopt;
|
|
2609
|
+
}
|
|
2610
|
+
")
|
|
2609
2611
|
(create_polyfill "
|
|
2610
2612
|
#include <memory>
|
|
2611
2613
|
#include <string>
|
|
@@ -2642,6 +2644,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
2642
2644
|
return rg_json_arr();
|
|
2643
2645
|
}
|
|
2644
2646
|
")
|
|
2647
|
+
(imp "<optional>")
|
|
2645
2648
|
(create_polyfill "
|
|
2646
2649
|
inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string& k) {
|
|
2647
2650
|
if (!o) { return nullptr; }
|
|
@@ -2650,10 +2653,14 @@ inline const rg_json_val* rg_json_find(const rg_json_obj& o, const std::string&
|
|
|
2650
2653
|
}
|
|
2651
2654
|
return nullptr;
|
|
2652
2655
|
}
|
|
2653
|
-
|
|
2656
|
+
// getStr is declared optional, and every other target answers null for a key
|
|
2657
|
+
// that is absent or not a string. Returning a bare std::string made that the
|
|
2658
|
+
// empty string, which is a value.
|
|
2659
|
+
inline std::optional<std::string> rg_json_get_str(const rg_json_obj& o, const std::string& k) {
|
|
2660
|
+
std::optional<std::string> res;
|
|
2654
2661
|
const rg_json_val* v = rg_json_find(o, k);
|
|
2655
|
-
if (v && std::holds_alternative<std::string>(*v)) {
|
|
2656
|
-
return
|
|
2662
|
+
if (v && std::holds_alternative<std::string>(*v)) { res = std::get<std::string>(*v); }
|
|
2663
|
+
return res;
|
|
2657
2664
|
}
|
|
2658
2665
|
inline bool rg_json_get_bool(const rg_json_obj& o, const std::string& k) {
|
|
2659
2666
|
const rg_json_val* v = rg_json_find(o, k);
|
|
@@ -2798,9 +2805,6 @@ static ArrayList<String> __getJSONKeys(JSONObject obj)
|
|
|
2798
2805
|
return list;
|
|
2799
2806
|
}
|
|
2800
2807
|
")
|
|
2801
|
-
(imp "org.json.JSONObject")
|
|
2802
|
-
(imp "org.json.JSONArray")
|
|
2803
|
-
|
|
2804
2808
|
)
|
|
2805
2809
|
go ("(func() []string {" nl I
|
|
2806
2810
|
"keys := reflect.ValueOf(" (e 1) ").MapKeys()" nl
|
|
@@ -3113,7 +3117,14 @@ List<dynamic>? rg_json_as_arr(dynamic v) {
|
|
|
3113
3117
|
}
|
|
3114
3118
|
")
|
|
3115
3119
|
)
|
|
3116
|
-
cpp ( "rg_json_as_arr(" (e 1) ")"
|
|
3120
|
+
cpp ( "rg_json_opt(rg_json_as_arr(" (e 1) ")" ")" (imp "<optional>") (create_polyfill "
|
|
3121
|
+
// an absent JSON object or array is the empty pointer; as an optional it is
|
|
3122
|
+
// std::nullopt, so has_value() tells a missing key from a present one
|
|
3123
|
+
template <class P> std::optional<P> rg_json_opt(const P & p) {
|
|
3124
|
+
if (p) { return p; }
|
|
3125
|
+
return std::nullopt;
|
|
3126
|
+
}
|
|
3127
|
+
")
|
|
3117
3128
|
(create_polyfill "
|
|
3118
3129
|
#include <memory>
|
|
3119
3130
|
#include <string>
|
|
@@ -3397,7 +3408,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
3397
3408
|
)
|
|
3398
3409
|
es6 ( (e 1) "[" (e 2) "]")
|
|
3399
3410
|
ranger( "(getValue " (e 1) " " (e 2) " )")
|
|
3400
|
-
java7( '__getJSONValue(' (e 1) ', ' (e 2) ')'
|
|
3411
|
+
java7( '__getJSONValue(' (e 1) ', ' (e 2) ')'
|
|
3401
3412
|
|
|
3402
3413
|
(create_polyfill '
|
|
3403
3414
|
static Object __getJSONValue(JSONArray o, Integer item)
|
|
@@ -4405,7 +4416,7 @@ inline rg_json_obj rg_json_parse_obj(const std::string& s) {
|
|
|
4405
4416
|
)
|
|
4406
4417
|
swift3 ( 'try JSONSerialization.jsonObject(with: ' (e 1) ', options:[]) as! [String:Any]' (imp 'Foundation') )
|
|
4407
4418
|
swift6 ( 'try JSONSerialization.jsonObject(with: ' (e 1) ', options:[]) as! [String:Any]' (imp 'Foundation') )
|
|
4408
|
-
java7 ("new JSONObject(" (e 1) ")"
|
|
4419
|
+
java7 ("new JSONObject(" (e 1) ")")
|
|
4409
4420
|
kotlin ("JSONObject(" (e 1) ")")
|
|
4410
4421
|
go ( "__r_json_to_interface(" (e 1) ")" (imp "encoding/json")
|
|
4411
4422
|
|
|
@@ -5425,7 +5436,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
5425
5436
|
swift3 ( '[Any]()' )
|
|
5426
5437
|
swift6 ( '[Any]()' )
|
|
5427
5438
|
ranger ("(json_array )")
|
|
5428
|
-
java7 ("new JSONArray()"
|
|
5439
|
+
java7 ("new JSONArray()")
|
|
5429
5440
|
kotlin ("JSONArray()")
|
|
5430
5441
|
go ( "make([]interface{},0)" )
|
|
5431
5442
|
php ( "array()" )
|
|
@@ -5485,7 +5496,7 @@ inline rg_json_arr rg_json_as_arr(const rg_json_val& v) {
|
|
|
5485
5496
|
swift3 ( '[String:Any]()' )
|
|
5486
5497
|
swift6 ( '[String:Any]()' )
|
|
5487
5498
|
ranger ("(json_object )")
|
|
5488
|
-
java7 ("new JSONObject()"
|
|
5499
|
+
java7 ("new JSONObject()")
|
|
5489
5500
|
kotlin ("JSONObject()")
|
|
5490
5501
|
go ( "make(map[string]interface{})" )
|
|
5491
5502
|
php ( "array()")
|
|
@@ -5504,7 +5515,7 @@ enum RJson { Null, Bool(bool), Int(i64), Double(f64), Str(String), Arr(Vec<RJson
|
|
|
5504
5515
|
swift3 ("[" ( repeat_from 1 ( (block 1) ) ) "]")
|
|
5505
5516
|
swift6 ("[" ( repeat_from 1 ( (block 1) ) ) "]")
|
|
5506
5517
|
ranger ("(json_array " ( repeat 1 ( (block 1) ) ) ")")
|
|
5507
|
-
java7 ("new JSONArray"
|
|
5518
|
+
java7 ("new JSONArray")
|
|
5508
5519
|
go ( "make([]interface{},0)" )
|
|
5509
5520
|
php ( "array()" )
|
|
5510
5521
|
python ("[" ( repeat_from 1 ( (block 1) ) ) "]")
|
package/dist/lib/Shell.rgr
CHANGED
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
; print (r.outText())
|
|
36
36
|
; }
|
|
37
37
|
;
|
|
38
|
-
; Build the argument vector rather than writing it as an inline literal:
|
|
39
|
-
;
|
|
40
|
-
;
|
|
41
|
-
;
|
|
38
|
+
; Build the argument vector rather than writing it as an inline literal: a
|
|
39
|
+
; one-element literal is flattened to its element on Rust (ISSUES.md #84). The
|
|
40
|
+
; same shape used to lose the whole array whenever the call result was
|
|
41
|
+
; immediately dereferenced, on every target (#85, fixed).
|
|
42
42
|
;
|
|
43
43
|
; =============================================================================
|
|
44
44
|
|
|
@@ -47,10 +47,10 @@ class AppleToolchain {
|
|
|
47
47
|
fn developerDir:string () {
|
|
48
48
|
; Every argument vector in this file is BUILT rather than written as
|
|
49
49
|
; an inline literal: a one-element literal is flattened to its element
|
|
50
|
-
; on Rust (ISSUES.md #84)
|
|
51
|
-
; taking it
|
|
52
|
-
; compiled on Node would be a poor advertisement for a
|
|
53
|
-
; compiler; this one is checked on seven targets.
|
|
50
|
+
; on Rust (ISSUES.md #84). Any literal used to be lost when the call
|
|
51
|
+
; taking it was immediately dereferenced (#85, fixed). A build driver
|
|
52
|
+
; that only compiled on Node would be a poor advertisement for a
|
|
53
|
+
; cross-language compiler; this one is checked on seven targets.
|
|
54
54
|
def argv:[string]
|
|
55
55
|
push argv "-p"
|
|
56
56
|
return (sh.text("xcode-select" argv))
|
package/dist/lib/apple/README.md
CHANGED
|
@@ -287,10 +287,11 @@ if ((!null? idOpt) && (!null? profOpt)) {
|
|
|
287
287
|
}
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
-
Every intermediate is bound rather than chained, and that is not style: a
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
above compile and run — they are
|
|
290
|
+
Every intermediate is bound rather than chained, and that is not style: a
|
|
291
|
+
`(expr).field` read as a call argument does not resolve (ISSUES.md #81), and a
|
|
292
|
+
call result that was immediately dereferenced used to lose an array literal in
|
|
293
|
+
its arguments (#85, fixed). Both examples above compile and run — they are
|
|
294
|
+
checked, not written from memory.
|
|
294
295
|
|
|
295
296
|
A worked example, end to end, is
|
|
296
297
|
[`gallery/ui/ios`](../../gallery/ui/ios/README.md): the dashboard demo as an
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
; records instead of executing, so the whole plan is a list of strings, and the
|
|
11
11
|
; simulator parser is a pure function over the text simctl prints.
|
|
12
12
|
;
|
|
13
|
-
; node
|
|
13
|
+
; node dist/rgrc.js -es6 lib/apple/apple_test.rgr -nodecli -d=tmp -o=apple_test.js
|
|
14
14
|
; node tmp/apple_test.js
|
|
15
15
|
; =============================================================================
|
|
16
16
|
|
package/dist/lib/core/README.md
CHANGED
|
@@ -10,7 +10,7 @@ templates, no per-target branches.
|
|
|
10
10
|
**Status: first slice, wired into the JS engine.** `RgNum`, `RgU32`, `RgText`
|
|
11
11
|
and `RgBase` are landed and gated, and `ComponentEngine.rgr` now delegates 16 of
|
|
12
12
|
its own functions here instead of carrying copies (268 lines deleted). The rest
|
|
13
|
-
is planned in [PLAN_JS_STDLIB.md](../../PLAN_JS_STDLIB.md).
|
|
13
|
+
is planned in [PLAN_JS_STDLIB.md](../../docs/plans/PLAN_JS_STDLIB.md).
|
|
14
14
|
|
|
15
15
|
| File | What | State |
|
|
16
16
|
| --- | --- | --- |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
; SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
; Package entry for `Import "pkg:evg"`. Individual files stay importable as
|
|
4
|
+
; `Import "pkg:evg/EVGColor.rgr"`. Relative imports inside this tree are
|
|
5
|
+
; unchanged (`Import "EVGElement.rgr"`).
|
|
6
|
+
|
|
7
|
+
Import "EVGElement.rgr"
|
|
8
|
+
Import "EVGUnit.rgr"
|
|
9
|
+
Import "EVGLayout.rgr"
|
|
10
|
+
Import "EVGDisplayList.rgr"
|
|
11
|
+
Import "EVGStyleSheet.rgr"
|
|
12
|
+
Import "EVGTransition.rgr"
|