Merge branch 'main' into mirror
This commit is contained in:
commit
6d82440704
|
@ -16,13 +16,13 @@
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@preserves/core": "0.992.4",
|
"@preserves/core": "0.995.200",
|
||||||
"@syndicate-lang/core": "*",
|
"@syndicate-lang/core": "*",
|
||||||
"@syndicate-lang/html": "*",
|
"@syndicate-lang/html": "*",
|
||||||
"@syndicate-lang/ws-relay": "*"
|
"@syndicate-lang/ws-relay": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@preserves/schema-cli": "0.992.5",
|
"@preserves/schema-cli": "0.995.201",
|
||||||
"@syndicate-lang/ts-plugin": "*",
|
"@syndicate-lang/ts-plugin": "*",
|
||||||
"@syndicate-lang/tsc": "*",
|
"@syndicate-lang/tsc": "*",
|
||||||
"rollup": "^2.60",
|
"rollup": "^2.60",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
let ?ds = dataspace
|
let ?ds = dataspace
|
||||||
|
|
||||||
# Connect using <route [<ws "...">] <ref "syndicate" [] #[acowDB2/oI+6aSEC3YIxGg]>>
|
# Connect using <route [<ws "...">] <ref {oid: "syndicate" sig: #[acowDB2/oI+6aSEC3YIxGg]}>
|
||||||
<bind <ref {oid: "syndicate" key: #x""}> $ds #f>
|
<bind <ref {oid: "syndicate" key: #x""}> $ds #f>
|
||||||
|
|
||||||
# Connect using <route [<ws "...">] <noise { service: "syndicate", key: #x"21f6cd4e11e7e37711d6b3084ff18cded8fc8abf293aa47d43e8bb86dda65516" }>>
|
# Connect using <route [<ws "...">] <noise { service: "syndicate", key: #x"21f6cd4e11e7e37711d6b3084ff18cded8fc8abf293aa47d43e8bb86dda65516" }>>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { fromJS, Bytes, Dataspace, Ref, Sturdy, AnyValue, Reader, Schemas, Embedded, stringify } from "@syndicate-lang/core";
|
import { fromJS, Bytes, Dataspace, Ref, Sturdy, AnyValue, Reader, Schemas, stringify } from "@syndicate-lang/core";
|
||||||
import { boot as bootHtml, Anchor, template as html, HtmlFragments, GlobalEvent, UIAttribute, UIChangeableProperty } from "@syndicate-lang/html";
|
import { boot as bootHtml, Anchor, template as html, HtmlFragments, GlobalEvent, UIAttribute, UIChangeableProperty } from "@syndicate-lang/html";
|
||||||
import { boot as bootWakeDetector, WakeEvent } from "./wake-detector";
|
import { boot as bootWakeDetector, WakeEvent } from "./wake-detector";
|
||||||
import { boot as bootWsRelay } from "@syndicate-lang/ws-relay";
|
import { boot as bootWsRelay } from "@syndicate-lang/ws-relay";
|
||||||
|
@ -46,12 +46,9 @@ function bootChat(ds: Ref) {
|
||||||
during G.ResolvePath({
|
during G.ResolvePath({
|
||||||
"route": route,
|
"route": route,
|
||||||
"addr": $addr,
|
"addr": $addr,
|
||||||
"control": $control_e: Embedded,
|
"control": $control: Ref,
|
||||||
"resolved": G.Resolved.accepted($remoteDs_e: Embedded),
|
"resolved": G.Resolved.accepted($remoteDs: Ref),
|
||||||
}) => {
|
}) => {
|
||||||
const remoteDs = remoteDs_e.embeddedValue;
|
|
||||||
const control = control_e.embeddedValue;
|
|
||||||
|
|
||||||
on message WakeEvent() => at control {
|
on message WakeEvent() => at control {
|
||||||
send message G.ForceDisconnect();
|
send message G.ForceDisconnect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,30 +2,30 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@preserves/core@0.992", "@preserves/core@^0.992.2":
|
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||||
version "0.992.2"
|
version "0.995.200"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.992.2.tgz#b3acc7badd25ccccbf8e034bb641c6cfad987c41"
|
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||||
integrity sha512-aibJ8c9mLcCf3MhXeLWv0hevfkHgu3pJmBDzhN9AGXMIw0/fO3uEEnLM1oPaFIPWnQG4WybiXTUh2wD1CoxABg==
|
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||||
|
|
||||||
"@preserves/schema-cli@0.992":
|
"@preserves/schema-cli@0.995.201":
|
||||||
version "0.992.2"
|
version "0.995.201"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema-cli/-/schema-cli-0.992.2.tgz#53defa05b0bd34cf5032255d761076797254ce8f"
|
resolved "https://registry.yarnpkg.com/@preserves/schema-cli/-/schema-cli-0.995.201.tgz#e87cb7ba51b225ff6ea96f177c5388907adf6717"
|
||||||
integrity sha512-ICJ0fqj3haJZosU7h8APm3GkoUaZs+BHKfj80BD8wuBf4iSLa4GAYASYThLZT/tlxU2iK1j4NghrG6/tCIj99w==
|
integrity sha512-n/lpVgWBY1UTRySPXIwWG4Yu87OrQ9b7Xo8zPPQzD/DJDTEDT3y3SUujY7UTF1pQn09xRGnfPnDu1RoRCv2J3w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "^0.992.2"
|
"@preserves/core" "^0.995.200"
|
||||||
"@preserves/schema" "^0.992.2"
|
"@preserves/schema" "^0.995.201"
|
||||||
chalk "^4.1"
|
chalk "^4.1"
|
||||||
chokidar "^3.5"
|
chokidar "^3.5"
|
||||||
commander "^7.2"
|
commander "^7.2"
|
||||||
glob "^7.1"
|
glob "^7.1"
|
||||||
minimatch "^3.0"
|
minimatch "^3.0"
|
||||||
|
|
||||||
"@preserves/schema@0.992", "@preserves/schema@^0.992.2":
|
"@preserves/schema@^0.995.201":
|
||||||
version "0.992.2"
|
version "0.995.201"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.992.2.tgz#975598b166500adc79f0d4e0cf2ae6dea3c2c111"
|
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||||
integrity sha512-I1zM9EWY0URw2zuRHLyROqVA9uqGhzQjuCpnTC8MeJToPt+xwVCXGl/NJYKhgofB14ZAgKT98h6YrLDR3yR6ug==
|
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "^0.992.2"
|
"@preserves/core" "^0.995.200"
|
||||||
|
|
||||||
"@rollup/pluginutils@^3.0.9":
|
"@rollup/pluginutils@^3.0.9":
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
@ -36,52 +36,49 @@
|
||||||
estree-walker "^1.0.1"
|
estree-walker "^1.0.1"
|
||||||
picomatch "^2.2.2"
|
picomatch "^2.2.2"
|
||||||
|
|
||||||
"@syndicate-lang/compiler@^0.13.2":
|
"@syndicate-lang/compiler@^0.21.1":
|
||||||
version "0.13.2"
|
version "0.21.1"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.13.2.tgz#e66de9f5828efb88ebe62266d014e13620961996"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||||
integrity sha512-GQa7GVkerWxoVqY3NtRZXS8aLqIsVfdA8KvgNSDb8fTNV8TKGLDxQRurtcCiuEKG9mtfnDTpk8i28HbijKw6fA==
|
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||||
|
|
||||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.19.1":
|
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||||
version "0.19.1"
|
version "0.32.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.19.1.tgz#506e4e6e9f6a0b7bd0b5f6a61ad6e98c3a9ccae6"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||||
integrity sha512-2CMtEhyb8cg/pcJWgEdsaPtb6TJS0EbgeHcvCRyEFm3gdENxrNHVpxTVznSNAJnZosMu1KbK735kkviH9etkjw==
|
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "0.992"
|
|
||||||
"@preserves/schema" "0.992"
|
|
||||||
salty-crypto "0.3.1"
|
salty-crypto "0.3.1"
|
||||||
|
|
||||||
"@syndicate-lang/html@*":
|
"@syndicate-lang/html@*":
|
||||||
version "0.19.1"
|
version "0.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.19.1.tgz#21611a6c5718f01c00ac3b18e191548a6dd16538"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.33.0.tgz#c53e6bf8a52b17c3747f4270713a8c9234f984af"
|
||||||
integrity sha512-qr4T065GIuMAI3VKAsYmUWcDyqTq/yGQndrG/Ub+L1P2ivU3AbU/0cuFUQVgFIZmoW/iqG9BQzjIUV8xiOsArw==
|
integrity sha512-xhN6NZOgLxlAQOyWG0JAgtyF1e1yQvrpNh5RBAPnucFYC024yo1ggZ08+KiaulhsoIKvRbBE6FU6p9dDm4/tpQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/core" "^0.19.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
|
|
||||||
"@syndicate-lang/ts-plugin@*":
|
"@syndicate-lang/ts-plugin@*":
|
||||||
version "0.19.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.19.1.tgz#c7ecf4e836314e16d0849a539ab4b22f7d4c10aa"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.34.0.tgz#df92f9044eeba528c80c41c5c9df49ee28902411"
|
||||||
integrity sha512-o7niu1QnhAONisil83jVnWK3ipwz8obB0iruJ1++W3nXEM2nW7yGPuJNyLwkk1cFuPzfknm/DFdf6WKz9CsJGw==
|
integrity sha512-OCO6Hm0euz2hZk6tYTrJQNEM8iDBeQ/dgpW2a/UP52XSP6fYj0OvUVfn+35ZkIL64S+zDsJjL/6XFN05UZyRGA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.19.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
|
|
||||||
"@syndicate-lang/tsc@*":
|
"@syndicate-lang/tsc@*":
|
||||||
version "0.19.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.19.1.tgz#25d48aa1a29e51c983d1ab6d8ab184eed26b465a"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.34.0.tgz#1056fba7f639bbf436d0c2ecd2717edc4c1e612a"
|
||||||
integrity sha512-Uul57ynMS3L6CRIponNyUQ4vmblA4iCXyIsjtsi3QktvFJ9DTV4MRJAXjq72662jjLneY/LKWuCPXFKG62PyQA==
|
integrity sha512-Ufj3xsdXMbMCavWsEkX/pFyXRpNIWRW+LFew1icD14DoSLqyBcoUEvskolOSgkSzC53tDjbd4/LXDVofIjIyUA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.19.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
glob "^7.1.6"
|
glob "^7.1.6"
|
||||||
yargs "^16.2.0"
|
yargs "^16.2.0"
|
||||||
|
|
||||||
"@syndicate-lang/ws-relay@*":
|
"@syndicate-lang/ws-relay@*":
|
||||||
version "0.20.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ws-relay/-/ws-relay-0.20.1.tgz#4d4fbc401e5eb8a474aedf5112f9e1de3391bff8"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/ws-relay/-/ws-relay-0.34.0.tgz#8b450ef18b22ca8e0c159c7925a1068796ad2c71"
|
||||||
integrity sha512-sv3r/eyQicBQFVJ8MrS2/OUOPtbr54fkgC6dGN0IdRIeMUFdsxn7HlF3Tumo9I9oOTMNL3Ye+Xkc0sKSLqm8ng==
|
integrity sha512-PT24Pp+ol/wWMSp/6H8i5zu7CgXm5nh0UsfpxJ3ZpvWFs/rIsoMflL/g+C1Q4DW9oFTn6/WFs07VdSLmE2/Uog==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "0.992"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
"@syndicate-lang/core" "^0.19.1"
|
|
||||||
salty-crypto "0.3"
|
salty-crypto "0.3"
|
||||||
|
|
||||||
"@types/estree@0.0.39":
|
"@types/estree@0.0.39":
|
||||||
|
@ -120,9 +117,9 @@ balanced-match@^1.0.0:
|
||||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||||
|
|
||||||
binary-extensions@^2.0.0:
|
binary-extensions@^2.0.0:
|
||||||
version "2.2.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
|
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522"
|
||||||
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
|
integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==
|
||||||
|
|
||||||
brace-expansion@^1.1.7:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.11"
|
version "1.1.11"
|
||||||
|
@ -148,9 +145,9 @@ chalk@^4.1:
|
||||||
supports-color "^7.1.0"
|
supports-color "^7.1.0"
|
||||||
|
|
||||||
chokidar@^3.5:
|
chokidar@^3.5:
|
||||||
version "3.5.3"
|
version "3.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
|
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
|
||||||
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
|
integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
|
||||||
dependencies:
|
dependencies:
|
||||||
anymatch "~3.1.2"
|
anymatch "~3.1.2"
|
||||||
braces "~3.0.2"
|
braces "~3.0.2"
|
||||||
|
@ -204,9 +201,9 @@ emoji-regex@^8.0.0:
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||||
|
|
||||||
escalade@^3.1.1:
|
escalade@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||||
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||||
|
|
||||||
estree-walker@^1.0.1:
|
estree-walker@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@preserves/core": "0.995.200",
|
||||||
|
"@preserves/schema": "0.995.201",
|
||||||
"@syndicate-lang/core": "*"
|
"@syndicate-lang/core": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@preserves/core@0.990", "@preserves/core@^0.990.0":
|
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||||
version "0.990.0"
|
version "0.995.200"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.990.0.tgz#c57c1c3d5159fc17477a4205d5a94a78fbf5b1aa"
|
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||||
integrity sha512-Mx013USv9JU1SrtMxaJISETBy2LZ402xH8ZnQI4JzG6W27ZwGV36DQrXAfF0x6cOmZMGKwJNqQrvmFhh7mEn6w==
|
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||||
|
|
||||||
"@preserves/schema@0.990.1":
|
"@preserves/schema@0.995.201":
|
||||||
version "0.990.1"
|
version "0.995.201"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.990.1.tgz#233e25855194ce0f6ffaa9968d59e50b7dc8635a"
|
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||||
integrity sha512-FdvH0peM7U+Yag8FUZ2CYqDTEWjX88+HWwAfVfndtGAwEOTyjqvAQib0aI9lRPPXHodtaNR9/mLFmZBqve80Ew==
|
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "^0.990.0"
|
"@preserves/core" "^0.995.200"
|
||||||
|
|
||||||
"@rollup/pluginutils@^3.0.9":
|
"@rollup/pluginutils@^3.0.9":
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
@ -23,45 +23,43 @@
|
||||||
estree-walker "^1.0.1"
|
estree-walker "^1.0.1"
|
||||||
picomatch "^2.2.2"
|
picomatch "^2.2.2"
|
||||||
|
|
||||||
"@syndicate-lang/compiler@^0.13.2":
|
"@syndicate-lang/compiler@^0.21.1":
|
||||||
version "0.13.2"
|
version "0.21.1"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.13.2.tgz#e66de9f5828efb88ebe62266d014e13620961996"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||||
integrity sha512-GQa7GVkerWxoVqY3NtRZXS8aLqIsVfdA8KvgNSDb8fTNV8TKGLDxQRurtcCiuEKG9mtfnDTpk8i28HbijKw6fA==
|
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||||
|
|
||||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.18.1":
|
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||||
version "0.18.1"
|
version "0.32.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.18.1.tgz#5cd2931acdab76150c0406428521e4746e62f18b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||||
integrity sha512-90d0YJCZJVrkxLe+fs5Z+vgigU3wux8VOnPje2E8Q/MXXecjHcBCQWQfcdwUxBdfPSFq9KdQS7g7VFqhu3X7mA==
|
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "0.990"
|
|
||||||
"@preserves/schema" "0.990.1"
|
|
||||||
salty-crypto "0.3.1"
|
salty-crypto "0.3.1"
|
||||||
|
|
||||||
"@syndicate-lang/syndicatec@*":
|
"@syndicate-lang/syndicatec@*":
|
||||||
version "0.18.2"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.18.2.tgz#e594f270705c3203a7e26420bc5df2b568977244"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.34.0.tgz#f3b88507b633552fe1f41f24def5121c0cafeaeb"
|
||||||
integrity sha512-iUVKqxmiXMC8uYM5bXdyssY6mtVGI5RQRAtmtikji81XJoYb5pfqGlSkMB6n6x7Cde4OsrzeMJYTJ9q7LvEcsQ==
|
integrity sha512-h3MPifJdXZTS3JVcvRG8GXMJMPBH4RYmJ3B7c2sjM826Pf6O8zT47Vuv1y2WyD9PS8BiSCI01uOR0W5AVJJT5w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
glob "^7.1.6"
|
glob "^7.1.6"
|
||||||
yargs "^16.2.0"
|
yargs "^16.2.0"
|
||||||
|
|
||||||
"@syndicate-lang/ts-plugin@*":
|
"@syndicate-lang/ts-plugin@*":
|
||||||
version "0.18.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.18.1.tgz#0567774f0d7cef6b498cf39bda6717bc334f7213"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.34.0.tgz#df92f9044eeba528c80c41c5c9df49ee28902411"
|
||||||
integrity sha512-wQJhQxGLjf3cW2w9RUGToZofsd3iG6GQPTHtRYnAYjyiCdxSb7fhZf7TNRkRv3m20Q1XIUSTiLg3ChU+1I9eEA==
|
integrity sha512-OCO6Hm0euz2hZk6tYTrJQNEM8iDBeQ/dgpW2a/UP52XSP6fYj0OvUVfn+35ZkIL64S+zDsJjL/6XFN05UZyRGA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
|
|
||||||
"@syndicate-lang/tsc@*":
|
"@syndicate-lang/tsc@*":
|
||||||
version "0.18.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.18.1.tgz#e56522052f792b8dad0bd21c6181b7c801ea893b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.34.0.tgz#1056fba7f639bbf436d0c2ecd2717edc4c1e612a"
|
||||||
integrity sha512-arNOK+0NnjCdg6lisOOBD4piMBAxV3OR5frDAQ+DI+44gruvY20Tzen2SFMre7vvr+xVkyQwiHH9VVrgtIQRkw==
|
integrity sha512-Ufj3xsdXMbMCavWsEkX/pFyXRpNIWRW+LFew1icD14DoSLqyBcoUEvskolOSgkSzC53tDjbd4/LXDVofIjIyUA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
glob "^7.1.6"
|
glob "^7.1.6"
|
||||||
yargs "^16.2.0"
|
yargs "^16.2.0"
|
||||||
|
|
||||||
|
@ -137,9 +135,9 @@ emoji-regex@^8.0.0:
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||||
|
|
||||||
escalade@^3.1.1:
|
escalade@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||||
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||||
|
|
||||||
estree-walker@^1.0.1:
|
estree-walker@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@preserves/core": "0.995.200",
|
||||||
|
"@preserves/schema": "0.995.201",
|
||||||
"@syndicate-lang/core": "*"
|
"@syndicate-lang/core": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@preserves/core@0.990", "@preserves/core@^0.990.0":
|
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||||
version "0.990.0"
|
version "0.995.200"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.990.0.tgz#c57c1c3d5159fc17477a4205d5a94a78fbf5b1aa"
|
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||||
integrity sha512-Mx013USv9JU1SrtMxaJISETBy2LZ402xH8ZnQI4JzG6W27ZwGV36DQrXAfF0x6cOmZMGKwJNqQrvmFhh7mEn6w==
|
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||||
|
|
||||||
"@preserves/schema@0.990.1":
|
"@preserves/schema@0.995.201":
|
||||||
version "0.990.1"
|
version "0.995.201"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.990.1.tgz#233e25855194ce0f6ffaa9968d59e50b7dc8635a"
|
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||||
integrity sha512-FdvH0peM7U+Yag8FUZ2CYqDTEWjX88+HWwAfVfndtGAwEOTyjqvAQib0aI9lRPPXHodtaNR9/mLFmZBqve80Ew==
|
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "^0.990.0"
|
"@preserves/core" "^0.995.200"
|
||||||
|
|
||||||
"@rollup/pluginutils@^3.0.9":
|
"@rollup/pluginutils@^3.0.9":
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
@ -23,27 +23,25 @@
|
||||||
estree-walker "^1.0.1"
|
estree-walker "^1.0.1"
|
||||||
picomatch "^2.2.2"
|
picomatch "^2.2.2"
|
||||||
|
|
||||||
"@syndicate-lang/compiler@^0.13.2":
|
"@syndicate-lang/compiler@^0.21.1":
|
||||||
version "0.13.2"
|
version "0.21.1"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.13.2.tgz#e66de9f5828efb88ebe62266d014e13620961996"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||||
integrity sha512-GQa7GVkerWxoVqY3NtRZXS8aLqIsVfdA8KvgNSDb8fTNV8TKGLDxQRurtcCiuEKG9mtfnDTpk8i28HbijKw6fA==
|
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||||
|
|
||||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.18.1":
|
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||||
version "0.18.1"
|
version "0.32.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.18.1.tgz#5cd2931acdab76150c0406428521e4746e62f18b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||||
integrity sha512-90d0YJCZJVrkxLe+fs5Z+vgigU3wux8VOnPje2E8Q/MXXecjHcBCQWQfcdwUxBdfPSFq9KdQS7g7VFqhu3X7mA==
|
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "0.990"
|
|
||||||
"@preserves/schema" "0.990.1"
|
|
||||||
salty-crypto "0.3.1"
|
salty-crypto "0.3.1"
|
||||||
|
|
||||||
"@syndicate-lang/tsc@*":
|
"@syndicate-lang/tsc@*":
|
||||||
version "0.18.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.18.1.tgz#e56522052f792b8dad0bd21c6181b7c801ea893b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.34.0.tgz#1056fba7f639bbf436d0c2ecd2717edc4c1e612a"
|
||||||
integrity sha512-arNOK+0NnjCdg6lisOOBD4piMBAxV3OR5frDAQ+DI+44gruvY20Tzen2SFMre7vvr+xVkyQwiHH9VVrgtIQRkw==
|
integrity sha512-Ufj3xsdXMbMCavWsEkX/pFyXRpNIWRW+LFew1icD14DoSLqyBcoUEvskolOSgkSzC53tDjbd4/LXDVofIjIyUA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
glob "^7.1.6"
|
glob "^7.1.6"
|
||||||
yargs "^16.2.0"
|
yargs "^16.2.0"
|
||||||
|
|
||||||
|
@ -119,9 +117,9 @@ emoji-regex@^8.0.0:
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||||
|
|
||||||
escalade@^3.1.1:
|
escalade@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||||
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||||
|
|
||||||
estree-walker@^1.0.1:
|
estree-walker@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@preserves/core": "0.995.200",
|
||||||
"@syndicate-lang/core": "*"
|
"@syndicate-lang/core": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -2,17 +2,10 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@preserves/core@0.990", "@preserves/core@^0.990.0":
|
"@preserves/core@0.995.200":
|
||||||
version "0.990.0"
|
version "0.995.200"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.990.0.tgz#c57c1c3d5159fc17477a4205d5a94a78fbf5b1aa"
|
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||||
integrity sha512-Mx013USv9JU1SrtMxaJISETBy2LZ402xH8ZnQI4JzG6W27ZwGV36DQrXAfF0x6cOmZMGKwJNqQrvmFhh7mEn6w==
|
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||||
|
|
||||||
"@preserves/schema@0.990.1":
|
|
||||||
version "0.990.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.990.1.tgz#233e25855194ce0f6ffaa9968d59e50b7dc8635a"
|
|
||||||
integrity sha512-FdvH0peM7U+Yag8FUZ2CYqDTEWjX88+HWwAfVfndtGAwEOTyjqvAQib0aI9lRPPXHodtaNR9/mLFmZBqve80Ew==
|
|
||||||
dependencies:
|
|
||||||
"@preserves/core" "^0.990.0"
|
|
||||||
|
|
||||||
"@rollup/pluginutils@^3.0.9":
|
"@rollup/pluginutils@^3.0.9":
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
@ -23,27 +16,25 @@
|
||||||
estree-walker "^1.0.1"
|
estree-walker "^1.0.1"
|
||||||
picomatch "^2.2.2"
|
picomatch "^2.2.2"
|
||||||
|
|
||||||
"@syndicate-lang/compiler@^0.13.2":
|
"@syndicate-lang/compiler@^0.21.1":
|
||||||
version "0.13.2"
|
version "0.21.1"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.13.2.tgz#e66de9f5828efb88ebe62266d014e13620961996"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||||
integrity sha512-GQa7GVkerWxoVqY3NtRZXS8aLqIsVfdA8KvgNSDb8fTNV8TKGLDxQRurtcCiuEKG9mtfnDTpk8i28HbijKw6fA==
|
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||||
|
|
||||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.18.1":
|
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||||
version "0.18.1"
|
version "0.32.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.18.1.tgz#5cd2931acdab76150c0406428521e4746e62f18b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||||
integrity sha512-90d0YJCZJVrkxLe+fs5Z+vgigU3wux8VOnPje2E8Q/MXXecjHcBCQWQfcdwUxBdfPSFq9KdQS7g7VFqhu3X7mA==
|
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "0.990"
|
|
||||||
"@preserves/schema" "0.990.1"
|
|
||||||
salty-crypto "0.3.1"
|
salty-crypto "0.3.1"
|
||||||
|
|
||||||
"@syndicate-lang/syndicatec@*":
|
"@syndicate-lang/syndicatec@*":
|
||||||
version "0.18.2"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.18.2.tgz#e594f270705c3203a7e26420bc5df2b568977244"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.34.0.tgz#f3b88507b633552fe1f41f24def5121c0cafeaeb"
|
||||||
integrity sha512-iUVKqxmiXMC8uYM5bXdyssY6mtVGI5RQRAtmtikji81XJoYb5pfqGlSkMB6n6x7Cde4OsrzeMJYTJ9q7LvEcsQ==
|
integrity sha512-h3MPifJdXZTS3JVcvRG8GXMJMPBH4RYmJ3B7c2sjM826Pf6O8zT47Vuv1y2WyD9PS8BiSCI01uOR0W5AVJJT5w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
glob "^7.1.6"
|
glob "^7.1.6"
|
||||||
yargs "^16.2.0"
|
yargs "^16.2.0"
|
||||||
|
|
||||||
|
@ -119,9 +110,9 @@ emoji-regex@^8.0.0:
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||||
|
|
||||||
escalade@^3.1.1:
|
escalade@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||||
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||||
|
|
||||||
estree-walker@^1.0.1:
|
estree-walker@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@preserves/core": "0.995.200",
|
||||||
|
"@preserves/schema": "0.995.201",
|
||||||
"@syndicate-lang/core": "*"
|
"@syndicate-lang/core": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@preserves/core@0.990", "@preserves/core@^0.990.0":
|
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||||
version "0.990.0"
|
version "0.995.200"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.990.0.tgz#c57c1c3d5159fc17477a4205d5a94a78fbf5b1aa"
|
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||||
integrity sha512-Mx013USv9JU1SrtMxaJISETBy2LZ402xH8ZnQI4JzG6W27ZwGV36DQrXAfF0x6cOmZMGKwJNqQrvmFhh7mEn6w==
|
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||||
|
|
||||||
"@preserves/schema@0.990.1":
|
"@preserves/schema@0.995.201":
|
||||||
version "0.990.1"
|
version "0.995.201"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.990.1.tgz#233e25855194ce0f6ffaa9968d59e50b7dc8635a"
|
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||||
integrity sha512-FdvH0peM7U+Yag8FUZ2CYqDTEWjX88+HWwAfVfndtGAwEOTyjqvAQib0aI9lRPPXHodtaNR9/mLFmZBqve80Ew==
|
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "^0.990.0"
|
"@preserves/core" "^0.995.200"
|
||||||
|
|
||||||
"@rollup/pluginutils@^3.0.9":
|
"@rollup/pluginutils@^3.0.9":
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
@ -23,27 +23,25 @@
|
||||||
estree-walker "^1.0.1"
|
estree-walker "^1.0.1"
|
||||||
picomatch "^2.2.2"
|
picomatch "^2.2.2"
|
||||||
|
|
||||||
"@syndicate-lang/compiler@^0.13.2":
|
"@syndicate-lang/compiler@^0.21.1":
|
||||||
version "0.13.2"
|
version "0.21.1"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.13.2.tgz#e66de9f5828efb88ebe62266d014e13620961996"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||||
integrity sha512-GQa7GVkerWxoVqY3NtRZXS8aLqIsVfdA8KvgNSDb8fTNV8TKGLDxQRurtcCiuEKG9mtfnDTpk8i28HbijKw6fA==
|
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||||
|
|
||||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.18.1":
|
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||||
version "0.18.1"
|
version "0.32.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.18.1.tgz#5cd2931acdab76150c0406428521e4746e62f18b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||||
integrity sha512-90d0YJCZJVrkxLe+fs5Z+vgigU3wux8VOnPje2E8Q/MXXecjHcBCQWQfcdwUxBdfPSFq9KdQS7g7VFqhu3X7mA==
|
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "0.990"
|
|
||||||
"@preserves/schema" "0.990.1"
|
|
||||||
salty-crypto "0.3.1"
|
salty-crypto "0.3.1"
|
||||||
|
|
||||||
"@syndicate-lang/syndicatec@*":
|
"@syndicate-lang/syndicatec@*":
|
||||||
version "0.18.2"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.18.2.tgz#e594f270705c3203a7e26420bc5df2b568977244"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/syndicatec/-/syndicatec-0.34.0.tgz#f3b88507b633552fe1f41f24def5121c0cafeaeb"
|
||||||
integrity sha512-iUVKqxmiXMC8uYM5bXdyssY6mtVGI5RQRAtmtikji81XJoYb5pfqGlSkMB6n6x7Cde4OsrzeMJYTJ9q7LvEcsQ==
|
integrity sha512-h3MPifJdXZTS3JVcvRG8GXMJMPBH4RYmJ3B7c2sjM826Pf6O8zT47Vuv1y2WyD9PS8BiSCI01uOR0W5AVJJT5w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
glob "^7.1.6"
|
glob "^7.1.6"
|
||||||
yargs "^16.2.0"
|
yargs "^16.2.0"
|
||||||
|
|
||||||
|
@ -119,9 +117,9 @@ emoji-regex@^8.0.0:
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||||
|
|
||||||
escalade@^3.1.1:
|
escalade@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||||
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||||
|
|
||||||
estree-walker@^1.0.1:
|
estree-walker@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=0.67, maximum-scale=0.67, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=0.67, maximum-scale=0.67, user-scalable=no">
|
||||||
<link href="css/style.css" rel="stylesheet" type="text/css">
|
<link href="css/style.css" rel="stylesheet" type="text/css">
|
||||||
|
<script src="node_modules/@preserves/core/dist/preserves.js"></script>
|
||||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||||
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
|
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
|
||||||
<script src="node_modules/@syndicate-lang/timer/dist/syndicate-timer.js"></script>
|
<script src="node_modules/@syndicate-lang/timer/dist/syndicate-timer.js"></script>
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@preserves/core": "0.995.200",
|
||||||
|
"@preserves/schema": "0.995.201",
|
||||||
"@syndicate-lang/core": "*",
|
"@syndicate-lang/core": "*",
|
||||||
"@syndicate-lang/html": "*",
|
"@syndicate-lang/html": "*",
|
||||||
"@syndicate-lang/timer": "*"
|
"@syndicate-lang/timer": "*"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { Record, Dataspace, Double, floatValue, Ref, stringify } from '@syndicate-lang/core';
|
import { Turn, Dataspace, Double, floatValue, Ref, Facet } from '@syndicate-lang/core';
|
||||||
import { boot as bootHtml, WindowEvent, template, Anchor } from '@syndicate-lang/html';
|
import { boot as bootHtml, WindowEvent, template, Anchor } from '@syndicate-lang/html';
|
||||||
import { boot as bootTimer, PeriodicTick } from '@syndicate-lang/timer';
|
import { boot as bootTimer, PeriodicTick } from '@syndicate-lang/timer';
|
||||||
|
|
||||||
|
@ -86,9 +86,7 @@ function spawnGame(mainDs: Ref) {
|
||||||
|
|
||||||
on (ypos.value > BOARD_HEIGHT - FLAPPY_HEIGHT) {
|
on (ypos.value > BOARD_HEIGHT - FLAPPY_HEIGHT) {
|
||||||
ypos.value = BOARD_HEIGHT - FLAPPY_HEIGHT;
|
ypos.value = BOARD_HEIGHT - FLAPPY_HEIGHT;
|
||||||
react {
|
assert GameOver();
|
||||||
assert GameOver();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,14 +139,14 @@ function spawnGame(mainDs: Ref) {
|
||||||
react {
|
react {
|
||||||
const pipeNumber = nextPipe.value++;
|
const pipeNumber = nextPipe.value++;
|
||||||
spawn linked named ['pipe', pipeNumber] {
|
spawn linked named ['pipe', pipeNumber] {
|
||||||
runPipe(pipeNumber);
|
runPipe(pipeNumber, Turn.activeFacet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function runPipe(i: number) {
|
function runPipe(i: number, mainPipeFacet: Facet) {
|
||||||
const xlocation = (i + 1) * 324;
|
const xlocation = (i + 1) * 324;
|
||||||
|
|
||||||
let ui = new Anchor();
|
let ui = new Anchor();
|
||||||
|
@ -159,21 +157,17 @@ function spawnGame(mainDs: Ref) {
|
||||||
+ PILLAR_HEAD_HEIGHT * 3;
|
+ PILLAR_HEAD_HEIGHT * 3;
|
||||||
const lowerHeight = FIELD_HEIGHT - upperHeight - PILLAR_GAP;
|
const lowerHeight = FIELD_HEIGHT - upperHeight - PILLAR_GAP;
|
||||||
|
|
||||||
stop on (xpos.value < -(PILLAR_WIDTH + FLAPPY_XPOS));
|
stop mainPipeFacet on (xpos.value < -(PILLAR_WIDTH + FLAPPY_XPOS));
|
||||||
|
|
||||||
at gameDs {
|
at gameDs {
|
||||||
react {
|
once (xpos.value <= 0) send message IncreaseScore();
|
||||||
stop on (xpos.value <= 0) send message IncreaseScore();
|
|
||||||
}
|
|
||||||
|
|
||||||
on asserted Position($flappyXpos, _) =>
|
on asserted Position($flappyXpos, _) =>
|
||||||
xpos.value = xlocation - floatValue(flappyXpos);
|
xpos.value = xlocation - floatValue(flappyXpos);
|
||||||
|
|
||||||
on asserted Position($xpos, $ypos) => {
|
on asserted Position($xpos, $ypos) => {
|
||||||
if (touchingPillar(floatValue(xpos), floatValue(ypos))) {
|
if (touchingPillar(floatValue(xpos), floatValue(ypos))) {
|
||||||
react {
|
assert GameOver();
|
||||||
assert GameOver();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@preserves/core@0.990", "@preserves/core@^0.990.0":
|
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||||
version "0.990.0"
|
version "0.995.200"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.990.0.tgz#c57c1c3d5159fc17477a4205d5a94a78fbf5b1aa"
|
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||||
integrity sha512-Mx013USv9JU1SrtMxaJISETBy2LZ402xH8ZnQI4JzG6W27ZwGV36DQrXAfF0x6cOmZMGKwJNqQrvmFhh7mEn6w==
|
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||||
|
|
||||||
"@preserves/schema@0.990.1":
|
"@preserves/schema@0.995.201":
|
||||||
version "0.990.1"
|
version "0.995.201"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.990.1.tgz#233e25855194ce0f6ffaa9968d59e50b7dc8635a"
|
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||||
integrity sha512-FdvH0peM7U+Yag8FUZ2CYqDTEWjX88+HWwAfVfndtGAwEOTyjqvAQib0aI9lRPPXHodtaNR9/mLFmZBqve80Ew==
|
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "^0.990.0"
|
"@preserves/core" "^0.995.200"
|
||||||
|
|
||||||
"@rollup/pluginutils@^3.0.9":
|
"@rollup/pluginutils@^3.0.9":
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
@ -23,49 +23,47 @@
|
||||||
estree-walker "^1.0.1"
|
estree-walker "^1.0.1"
|
||||||
picomatch "^2.2.2"
|
picomatch "^2.2.2"
|
||||||
|
|
||||||
"@syndicate-lang/compiler@^0.13.2":
|
"@syndicate-lang/compiler@^0.21.1":
|
||||||
version "0.13.2"
|
version "0.21.1"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.13.2.tgz#e66de9f5828efb88ebe62266d014e13620961996"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||||
integrity sha512-GQa7GVkerWxoVqY3NtRZXS8aLqIsVfdA8KvgNSDb8fTNV8TKGLDxQRurtcCiuEKG9mtfnDTpk8i28HbijKw6fA==
|
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||||
|
|
||||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.18.1":
|
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||||
version "0.18.1"
|
version "0.32.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.18.1.tgz#5cd2931acdab76150c0406428521e4746e62f18b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||||
integrity sha512-90d0YJCZJVrkxLe+fs5Z+vgigU3wux8VOnPje2E8Q/MXXecjHcBCQWQfcdwUxBdfPSFq9KdQS7g7VFqhu3X7mA==
|
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "0.990"
|
|
||||||
"@preserves/schema" "0.990.1"
|
|
||||||
salty-crypto "0.3.1"
|
salty-crypto "0.3.1"
|
||||||
|
|
||||||
"@syndicate-lang/html@*":
|
"@syndicate-lang/html@*":
|
||||||
version "0.18.2"
|
version "0.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.18.2.tgz#276f70a209d90cf938eb27ebdddadfb1c299f234"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.33.0.tgz#c53e6bf8a52b17c3747f4270713a8c9234f984af"
|
||||||
integrity sha512-VTMqrXLFvUQH/TWxTG+YZjUqymoNprde1bhJ2JQ1xyqlHAB82tYXZRJA+/qn93mFs6jCEN9vzvXyNbmJuyYH7Q==
|
integrity sha512-xhN6NZOgLxlAQOyWG0JAgtyF1e1yQvrpNh5RBAPnucFYC024yo1ggZ08+KiaulhsoIKvRbBE6FU6p9dDm4/tpQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
|
|
||||||
"@syndicate-lang/timer@*":
|
"@syndicate-lang/timer@*":
|
||||||
version "0.18.1"
|
version "0.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/timer/-/timer-0.18.1.tgz#64f1364eaea77b9ec5b77d41a464baeadf32031b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/timer/-/timer-0.33.0.tgz#cdb38ebe777332ec58a5b0b9483db809275a61de"
|
||||||
integrity sha512-49acCxOpOR4LgW9ENQ32+A/wF+fQgvAwhsBS4phzk3DB/Yj9opFZW5MOlMP4R9+iyoN1Nocwq0OO89QGnqg9Wg==
|
integrity sha512-cBon+nk8zvNeU4zC6tg7nhgJnmrRoXHYE140UK3gscNFcg1LZ1d7q9WxfVTzFtRocRBslv6pworSwCDn3Go7TQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
|
|
||||||
"@syndicate-lang/ts-plugin@*":
|
"@syndicate-lang/ts-plugin@*":
|
||||||
version "0.18.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.18.1.tgz#0567774f0d7cef6b498cf39bda6717bc334f7213"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.34.0.tgz#df92f9044eeba528c80c41c5c9df49ee28902411"
|
||||||
integrity sha512-wQJhQxGLjf3cW2w9RUGToZofsd3iG6GQPTHtRYnAYjyiCdxSb7fhZf7TNRkRv3m20Q1XIUSTiLg3ChU+1I9eEA==
|
integrity sha512-OCO6Hm0euz2hZk6tYTrJQNEM8iDBeQ/dgpW2a/UP52XSP6fYj0OvUVfn+35ZkIL64S+zDsJjL/6XFN05UZyRGA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
|
|
||||||
"@syndicate-lang/tsc@*":
|
"@syndicate-lang/tsc@*":
|
||||||
version "0.18.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.18.1.tgz#e56522052f792b8dad0bd21c6181b7c801ea893b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.34.0.tgz#1056fba7f639bbf436d0c2ecd2717edc4c1e612a"
|
||||||
integrity sha512-arNOK+0NnjCdg6lisOOBD4piMBAxV3OR5frDAQ+DI+44gruvY20Tzen2SFMre7vvr+xVkyQwiHH9VVrgtIQRkw==
|
integrity sha512-Ufj3xsdXMbMCavWsEkX/pFyXRpNIWRW+LFew1icD14DoSLqyBcoUEvskolOSgkSzC53tDjbd4/LXDVofIjIyUA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
glob "^7.1.6"
|
glob "^7.1.6"
|
||||||
yargs "^16.2.0"
|
yargs "^16.2.0"
|
||||||
|
|
||||||
|
@ -141,9 +139,9 @@ emoji-regex@^8.0.0:
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||||
|
|
||||||
escalade@^3.1.1:
|
escalade@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||||
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||||
|
|
||||||
estree-walker@^1.0.1:
|
estree-walker@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<title>Syndicate: Table Example</title>
|
<title>Syndicate: Table Example</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<script src="node_modules/@preserves/core/dist/preserves.js"></script>
|
||||||
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
|
||||||
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
|
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@preserves/core": "0.995.200",
|
||||||
|
"@preserves/schema": "0.995.201",
|
||||||
"@syndicate-lang/core": "*",
|
"@syndicate-lang/core": "*",
|
||||||
"@syndicate-lang/html": "*"
|
"@syndicate-lang/html": "*"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { Dataspace, Embedded, Value, Ref } from '@syndicate-lang/core';
|
import { Dataspace, Value, Ref } from '@syndicate-lang/core';
|
||||||
import { boot as bootHtml, UIEvent, GlobalEvent, HtmlFragments, template, Anchor } from '@syndicate-lang/html';
|
import { boot as bootHtml, UIEvent, GlobalEvent, HtmlFragments, template, Anchor } from '@syndicate-lang/html';
|
||||||
|
|
||||||
assertion type Person(id, firstName, lastName, address, age);
|
assertion type Person(id, firstName, lastName, address, age);
|
||||||
|
@ -42,7 +42,7 @@ Dataspace.boot(ds => {
|
||||||
|
|
||||||
spawn named 'controller' {
|
spawn named 'controller' {
|
||||||
on message GlobalEvent('table#the-table th', 'click', $e) => {
|
on message GlobalEvent('table#the-table th', 'click', $e) => {
|
||||||
const event = (e as Embedded<Ref>).embeddedValue.target.data as Event;
|
const event = (e as Ref).target.data as Event;
|
||||||
send message SetSortColumn(JSON.parse((event.target as HTMLElement).dataset.column!));
|
send message SetSortColumn(JSON.parse((event.target as HTMLElement).dataset.column!));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@preserves/core@0.990", "@preserves/core@^0.990.0":
|
"@preserves/core@0.995.200", "@preserves/core@^0.995.200":
|
||||||
version "0.990.0"
|
version "0.995.200"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.990.0.tgz#c57c1c3d5159fc17477a4205d5a94a78fbf5b1aa"
|
resolved "https://registry.yarnpkg.com/@preserves/core/-/core-0.995.200.tgz#65575cf8f9320e73b5d37fa9ac9d6881a33fd3a6"
|
||||||
integrity sha512-Mx013USv9JU1SrtMxaJISETBy2LZ402xH8ZnQI4JzG6W27ZwGV36DQrXAfF0x6cOmZMGKwJNqQrvmFhh7mEn6w==
|
integrity sha512-htZ2x+hltUpKoPsviWSuelzZW96po9zVSsN0RZEih60FahNX0R2LCqFJ6v5lyATuQ9oHALVi0w8w4rtf8oiAJw==
|
||||||
|
|
||||||
"@preserves/schema@0.990.1":
|
"@preserves/schema@0.995.201":
|
||||||
version "0.990.1"
|
version "0.995.201"
|
||||||
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.990.1.tgz#233e25855194ce0f6ffaa9968d59e50b7dc8635a"
|
resolved "https://registry.yarnpkg.com/@preserves/schema/-/schema-0.995.201.tgz#827ad539afb0fdf68ba885ee3ff43db0fd473aa5"
|
||||||
integrity sha512-FdvH0peM7U+Yag8FUZ2CYqDTEWjX88+HWwAfVfndtGAwEOTyjqvAQib0aI9lRPPXHodtaNR9/mLFmZBqve80Ew==
|
integrity sha512-0SuhwOEAfxtrAeOTZ8V1yNEcHHHEbfUmoFawrF+vzTQFNZRz/X3LF1FM6wOiJlHtb7tBr4B+rHXX8jfNrqrdkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "^0.990.0"
|
"@preserves/core" "^0.995.200"
|
||||||
|
|
||||||
"@rollup/pluginutils@^3.0.9":
|
"@rollup/pluginutils@^3.0.9":
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
@ -23,42 +23,40 @@
|
||||||
estree-walker "^1.0.1"
|
estree-walker "^1.0.1"
|
||||||
picomatch "^2.2.2"
|
picomatch "^2.2.2"
|
||||||
|
|
||||||
"@syndicate-lang/compiler@^0.13.2":
|
"@syndicate-lang/compiler@^0.21.1":
|
||||||
version "0.13.2"
|
version "0.21.1"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.13.2.tgz#e66de9f5828efb88ebe62266d014e13620961996"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/compiler/-/compiler-0.21.1.tgz#b6316bac14d053c313b3442be68f532a60c47cb3"
|
||||||
integrity sha512-GQa7GVkerWxoVqY3NtRZXS8aLqIsVfdA8KvgNSDb8fTNV8TKGLDxQRurtcCiuEKG9mtfnDTpk8i28HbijKw6fA==
|
integrity sha512-daaYh1i0XmoHt6eTtO4gWblfVKMjp9trwxqR62wUSONY3gtJ5Bn4hG3dMgfoMz2NvOWbJHaGz/95J0jRubITxA==
|
||||||
|
|
||||||
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.18.1":
|
"@syndicate-lang/core@*", "@syndicate-lang/core@^0.32.0":
|
||||||
version "0.18.1"
|
version "0.32.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.18.1.tgz#5cd2931acdab76150c0406428521e4746e62f18b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/core/-/core-0.32.0.tgz#0efbbff176cac2969c2b6ba70a19965add3a2c61"
|
||||||
integrity sha512-90d0YJCZJVrkxLe+fs5Z+vgigU3wux8VOnPje2E8Q/MXXecjHcBCQWQfcdwUxBdfPSFq9KdQS7g7VFqhu3X7mA==
|
integrity sha512-ERVXk0W1xLaKvUa79Ek74YvqfBU543cUTb2GJvp76TP5k1jA97q9GzhddicS/s8lqu8SUC1+IXmKiJk0NX2TWQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preserves/core" "0.990"
|
|
||||||
"@preserves/schema" "0.990.1"
|
|
||||||
salty-crypto "0.3.1"
|
salty-crypto "0.3.1"
|
||||||
|
|
||||||
"@syndicate-lang/html@*":
|
"@syndicate-lang/html@*":
|
||||||
version "0.18.2"
|
version "0.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.18.2.tgz#276f70a209d90cf938eb27ebdddadfb1c299f234"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/html/-/html-0.33.0.tgz#c53e6bf8a52b17c3747f4270713a8c9234f984af"
|
||||||
integrity sha512-VTMqrXLFvUQH/TWxTG+YZjUqymoNprde1bhJ2JQ1xyqlHAB82tYXZRJA+/qn93mFs6jCEN9vzvXyNbmJuyYH7Q==
|
integrity sha512-xhN6NZOgLxlAQOyWG0JAgtyF1e1yQvrpNh5RBAPnucFYC024yo1ggZ08+KiaulhsoIKvRbBE6FU6p9dDm4/tpQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
|
|
||||||
"@syndicate-lang/ts-plugin@*":
|
"@syndicate-lang/ts-plugin@*":
|
||||||
version "0.18.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.18.1.tgz#0567774f0d7cef6b498cf39bda6717bc334f7213"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/ts-plugin/-/ts-plugin-0.34.0.tgz#df92f9044eeba528c80c41c5c9df49ee28902411"
|
||||||
integrity sha512-wQJhQxGLjf3cW2w9RUGToZofsd3iG6GQPTHtRYnAYjyiCdxSb7fhZf7TNRkRv3m20Q1XIUSTiLg3ChU+1I9eEA==
|
integrity sha512-OCO6Hm0euz2hZk6tYTrJQNEM8iDBeQ/dgpW2a/UP52XSP6fYj0OvUVfn+35ZkIL64S+zDsJjL/6XFN05UZyRGA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
|
|
||||||
"@syndicate-lang/tsc@*":
|
"@syndicate-lang/tsc@*":
|
||||||
version "0.18.1"
|
version "0.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.18.1.tgz#e56522052f792b8dad0bd21c6181b7c801ea893b"
|
resolved "https://registry.yarnpkg.com/@syndicate-lang/tsc/-/tsc-0.34.0.tgz#1056fba7f639bbf436d0c2ecd2717edc4c1e612a"
|
||||||
integrity sha512-arNOK+0NnjCdg6lisOOBD4piMBAxV3OR5frDAQ+DI+44gruvY20Tzen2SFMre7vvr+xVkyQwiHH9VVrgtIQRkw==
|
integrity sha512-Ufj3xsdXMbMCavWsEkX/pFyXRpNIWRW+LFew1icD14DoSLqyBcoUEvskolOSgkSzC53tDjbd4/LXDVofIjIyUA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@syndicate-lang/compiler" "^0.13.2"
|
"@syndicate-lang/compiler" "^0.21.1"
|
||||||
"@syndicate-lang/core" "^0.18.1"
|
"@syndicate-lang/core" "^0.32.0"
|
||||||
glob "^7.1.6"
|
glob "^7.1.6"
|
||||||
yargs "^16.2.0"
|
yargs "^16.2.0"
|
||||||
|
|
||||||
|
@ -134,9 +132,9 @@ emoji-regex@^8.0.0:
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||||
|
|
||||||
escalade@^3.1.1:
|
escalade@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
|
||||||
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
|
||||||
|
|
||||||
estree-walker@^1.0.1:
|
estree-walker@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"packages/*/examples/*/"
|
"packages/*/examples/*/"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@preserves/core": "0.992.4",
|
"@preserves/core": "0.995.200",
|
||||||
"@rollup/plugin-node-resolve": "^13.0",
|
"@rollup/plugin-node-resolve": "^13.0",
|
||||||
"@types/jest": "^27.0",
|
"@types/jest": "^27.0",
|
||||||
"@types/node": "^14",
|
"@types/node": "^14",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2023-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
const SyndicateBrowserStdenv = {
|
const SyndicateBrowserStdenv = {
|
||||||
autoboot: true,
|
autoboot: true,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@syndicate-lang/browser-stdenv",
|
"name": "@syndicate-lang/browser-stdenv",
|
||||||
"version": "0.23.3",
|
"version": "0.33.0",
|
||||||
"description": "Aggregated Syndicate and Preserves scripts for in-browser use",
|
"description": "Aggregated Syndicate and Preserves scripts for in-browser use",
|
||||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/browser-stdenv",
|
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/browser-stdenv",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
|
@ -15,15 +15,15 @@
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "./build-aggregate.sh",
|
"prepare": "./build-aggregate.sh",
|
||||||
"clean": "rm -rf index.js index.min.js",
|
"clean": "rm -rf index.js index.min.js *.js.map",
|
||||||
"veryclean": "yarn run clean && rm -rf node_modules"
|
"veryclean": "yarn run clean && rm -rf node_modules"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@preserves/core": "0.992.4",
|
"@preserves/core": "0.995.200",
|
||||||
"@preserves/schema": "0.992.5",
|
"@preserves/schema": "0.995.201",
|
||||||
"@syndicate-lang/compiler": "^0.18.0",
|
"@syndicate-lang/compiler": "^0.21.1",
|
||||||
"@syndicate-lang/core": "^0.23.0",
|
"@syndicate-lang/core": "^0.32.0",
|
||||||
"@syndicate-lang/html2": "^0.24.2",
|
"@syndicate-lang/html2": "^0.33.0",
|
||||||
"@syndicate-lang/ws-relay": "^0.25.0"
|
"@syndicate-lang/ws-relay": "^0.34.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
preset: 'ts-jest',
|
||||||
|
testEnvironment: 'node',
|
||||||
|
};
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@syndicate-lang/compiler",
|
"name": "@syndicate-lang/compiler",
|
||||||
"version": "0.18.0",
|
"version": "0.21.1",
|
||||||
"description": "Syndicate/JS compiler library",
|
"description": "Syndicate/JS compiler library",
|
||||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/compiler",
|
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/compiler",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
|
@ -18,7 +18,13 @@
|
||||||
"rollup": "../../node_modules/.bin/rollup -c",
|
"rollup": "../../node_modules/.bin/rollup -c",
|
||||||
"rollup:watch": "../../node_modules/.bin/rollup -c -w",
|
"rollup:watch": "../../node_modules/.bin/rollup -c -w",
|
||||||
"clean": "rm -rf lib dist",
|
"clean": "rm -rf lib dist",
|
||||||
"veryclean": "yarn run clean && rm -rf node_modules"
|
"veryclean": "yarn run clean && rm -rf node_modules",
|
||||||
|
"test": "../../node_modules/.bin/jest",
|
||||||
|
"test:watch": "yarn test --watch"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/js-beautify": "1.14",
|
||||||
|
"js-beautify": "1.15"
|
||||||
},
|
},
|
||||||
"main": "dist/syndicate-compiler.js",
|
"main": "dist/syndicate-compiler.js",
|
||||||
"module": "lib/index.js",
|
"module": "lib/index.js",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { SyndicateRollup } from '../../rollup.js';
|
import { SyndicateRollup } from '../../rollup.js';
|
||||||
const r = new SyndicateRollup('syndicate-compiler', { globalName: 'SyndicateCompiler' });
|
const r = new SyndicateRollup('syndicate-compiler', { globalName: 'SyndicateCompiler' });
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isToken, isTokenType, replace, commaJoin, startPos, fixPos, joinItems,
|
isToken, isTokenType, replace, commaJoin, startPos, fixPos, joinItems,
|
||||||
|
@ -7,7 +7,7 @@ import {
|
||||||
|
|
||||||
Items, Pattern, Templates, Substitution, TokenType,
|
Items, Pattern, Templates, Substitution, TokenType,
|
||||||
SourceMap, CodeWriter, TemplateFunction, Token, SpanIndex, match, TokenBase, getRange, Pos,
|
SourceMap, CodeWriter, TemplateFunction, Token, SpanIndex, match, TokenBase, getRange, Pos,
|
||||||
} from '../syntax/index.js';
|
} from '../syntax/index';
|
||||||
import {
|
import {
|
||||||
SyndicateParser, SyndicateTypedParser,
|
SyndicateParser, SyndicateTypedParser,
|
||||||
Identifier,
|
Identifier,
|
||||||
|
@ -17,7 +17,8 @@ import {
|
||||||
|
|
||||||
compilePattern,
|
compilePattern,
|
||||||
SpawnStatement,
|
SpawnStatement,
|
||||||
} from './grammar.js';
|
FacetToStop,
|
||||||
|
} from './grammar';
|
||||||
|
|
||||||
export function stripShebang(items: Items): Items {
|
export function stripShebang(items: Items): Items {
|
||||||
if ((items.length > 0) &&
|
if ((items.length > 0) &&
|
||||||
|
@ -116,20 +117,43 @@ function binderTypeGuard(t: TemplateFunction): (binder: Binder, index: number) =
|
||||||
export function expand(tree: Items, ctx: ExpansionContext): Items {
|
export function expand(tree: Items, ctx: ExpansionContext): Items {
|
||||||
const macro = new Templates(undefined, { extraDelimiters: ':' });
|
const macro = new Templates(undefined, { extraDelimiters: ':' });
|
||||||
|
|
||||||
function terminalWrap(t: TemplateFunction, isTerminal: boolean, body: Statement): Statement {
|
function terminalWrap(
|
||||||
if (isTerminal) {
|
t: TemplateFunction,
|
||||||
return t`__SYNDICATE__.Turn.active._stop(__SYNDICATE__.Turn.activeFacet, () => {${body}})`
|
facetToStop: FacetToStop | 'none' | 'once-wrapper',
|
||||||
|
body: Statement,
|
||||||
|
): Statement {
|
||||||
|
if (facetToStop === 'none') {
|
||||||
|
return walk(body);
|
||||||
} else {
|
} else {
|
||||||
return body;
|
const toStop =
|
||||||
|
facetToStop === 'default' ? 'currentSyndicateFacet' :
|
||||||
|
facetToStop === 'once-wrapper' ? '__once_facet' :
|
||||||
|
walk(facetToStop);
|
||||||
|
const resetCurrentSyndicateFacet =
|
||||||
|
facetToStop === 'once-wrapper' ? [] :
|
||||||
|
t`const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;`;
|
||||||
|
return t`__SYNDICATE__.Turn.active._stop(${toStop}, () => {${resetCurrentSyndicateFacet}${walk(body)}})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function facetWrap(t: TemplateFunction, items: Items): Items {
|
function facetWrap(
|
||||||
return t`__SYNDICATE__.Turn.active.facet(() => {${items}})`;
|
t: TemplateFunction,
|
||||||
|
facetName: Identifier | 'default' | 'once-wrapper',
|
||||||
|
items: Items,
|
||||||
|
): Items {
|
||||||
|
if (facetName === 'once-wrapper') {
|
||||||
|
return t`__SYNDICATE__.Turn.active.facet(() => {const __once_facet = __SYNDICATE__.Turn.activeFacet; ${items}});`;
|
||||||
|
} else {
|
||||||
|
const defaultLabel = t`const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet; `;
|
||||||
|
const customLabel = facetName === 'default'
|
||||||
|
? []
|
||||||
|
: t`const ${facetName.text} = currentSyndicateFacet; `;
|
||||||
|
return t`__SYNDICATE__.Turn.active.facet(() => {${defaultLabel}${customLabel}${items}});`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function x<T>(p: Pattern<T>, f: (v: T, t: TemplateFunction) => Items) {
|
function x<T>(p: Pattern<T>, f: (v: T, t: TemplateFunction) => Items) {
|
||||||
tree = replace(tree, p, (v, start) => f(v, macro.template(fixPos(start))));
|
tree = replace(tree, null, p, (v, start) => f(v, macro.template(fixPos(start))));
|
||||||
}
|
}
|
||||||
|
|
||||||
function xf<T extends TurnAction>(p: Pattern<T>, f: (v: T, t: TemplateFunction) => Items) {
|
function xf<T extends TurnAction>(p: Pattern<T>, f: (v: T, t: TemplateFunction) => Items) {
|
||||||
|
@ -144,7 +168,7 @@ export function expand(tree: Items, ctx: ExpansionContext): Items {
|
||||||
// following transformations matters.
|
// following transformations matters.
|
||||||
|
|
||||||
xf(ctx.parser.duringStatement, (s, t) => {
|
xf(ctx.parser.duringStatement, (s, t) => {
|
||||||
let spawn = match(ctx.parser.spawn, s.body, null);
|
let spawn = match(ctx.parser.spawn, s.body, null, null);
|
||||||
if (spawn !== null) {
|
if (spawn !== null) {
|
||||||
if (spawn.linkedToken !== null) {
|
if (spawn.linkedToken !== null) {
|
||||||
ctx.emitError(`during ... spawn doesn't need "linked", it's always linked`,
|
ctx.emitError(`during ... spawn doesn't need "linked", it's always linked`,
|
||||||
|
@ -155,7 +179,7 @@ export function expand(tree: Items, ctx: ExpansionContext): Items {
|
||||||
|
|
||||||
let body = (spawn === null)
|
let body = (spawn === null)
|
||||||
? walk(s.body)
|
? walk(s.body)
|
||||||
: expandSpawn(spawn, t, t`__SYNDICATE__.Turn.activeFacet.preventInertCheck();`);
|
: expandSpawn(spawn, t, t` __SYNDICATE__.Turn.activeFacet.preventInertCheck();`);
|
||||||
|
|
||||||
const sa = compilePattern(s.pattern);
|
const sa = compilePattern(s.pattern);
|
||||||
const assertion = t`__SYNDICATE__.Observe({
|
const assertion = t`__SYNDICATE__.Observe({
|
||||||
|
@ -185,8 +209,9 @@ ${joinItems(sa.captureBinders.map(binderTypeGuard(t)), '\n')}
|
||||||
? t`, new __SYNDICATE__.Set([${commaJoin(s.initialAssertions.map(walk))}])`
|
? t`, new __SYNDICATE__.Set([${commaJoin(s.initialAssertions.map(walk))}])`
|
||||||
: ``;
|
: ``;
|
||||||
*/
|
*/
|
||||||
const n = spawn.name === void 0 ? '' : t` __SYNDICATE__.Turn.activeFacet.actor.name = ${walk(spawn.name)};`;
|
const f = t` const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;`;
|
||||||
return t`__SYNDICATE__.Dataspace._spawn${spawn.linkedToken ? 'Link': ''}(() => {${n} ${inject} ${walk(spawn.body)} });`;
|
const n = spawn.name === void 0 ? '' : t` currentSyndicateFacet.actor.name = ${walk(spawn.name)};`;
|
||||||
|
return t`__SYNDICATE__.Dataspace._spawn${spawn.linkedToken ? 'Link': ''}(() => {${f}${n}${inject}${walk(spawn.body)}});`;
|
||||||
}
|
}
|
||||||
|
|
||||||
x(ctx.parser.spawn, expandSpawn);
|
x(ctx.parser.spawn, expandSpawn);
|
||||||
|
@ -226,10 +251,10 @@ ${joinItems(sa.captureBinders.map(binderTypeGuard(t)), '\n')}
|
||||||
t`_dataflow(() => {${walk(s.body)}});`);
|
t`_dataflow(() => {${walk(s.body)}});`);
|
||||||
|
|
||||||
x(ctx.parser.eventHandlerEndpointStatement, (s, t) => {
|
x(ctx.parser.eventHandlerEndpointStatement, (s, t) => {
|
||||||
const wrap = s.once ? (i: Items) => facetWrap(t, i) : (i: Items) => i;
|
const wrap = s.once ? (i: Items) => facetWrap(t, 'once-wrapper', i) : (i: Items) => i;
|
||||||
|
|
||||||
if (s.triggerType === 'dataflow') {
|
if (s.triggerType === 'dataflow') {
|
||||||
return wrap(t`__SYNDICATE__.Turn.active._dataflow(() => { if (${walk(s.predicate)}) { ${terminalWrap(t, s.terminal, walk(s.body))} } });`);
|
return wrap(t`__SYNDICATE__.Turn.active._dataflow(() => { if (${walk(s.predicate)}) { ${terminalWrap(t, s.facetToStop, s.body)} } });`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s.triggerType === 'stop') {
|
if (s.triggerType === 'stop') {
|
||||||
|
@ -247,19 +272,19 @@ ${joinItems(sa.captureBinders.map(binderTypeGuard(t)), '\n')}
|
||||||
case 'asserted':
|
case 'asserted':
|
||||||
entity = t`{
|
entity = t`{
|
||||||
assert: (${ctx.argDecl(t, '__vs', '__SYNDICATE__.AnyValue')}, ${ctx.argDecl(t, '__handle', '__SYNDICATE__.Handle')}) => {
|
assert: (${ctx.argDecl(t, '__vs', '__SYNDICATE__.AnyValue')}, ${ctx.argDecl(t, '__handle', '__SYNDICATE__.Handle')}) => {
|
||||||
${guardBody(terminalWrap(t, s.terminal, walk(s.body)))}
|
${guardBody(terminalWrap(t, s.facetToStop, s.body))}
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
break;
|
break;
|
||||||
case 'retracted':
|
case 'retracted':
|
||||||
entity = t`__SYNDICATE__.assertionObserver((${ctx.argDecl(t, '__vs', '__SYNDICATE__.AnyValue')}) => {
|
entity = t`__SYNDICATE__.assertionObserver((${ctx.argDecl(t, '__vs', '__SYNDICATE__.AnyValue')}) => {
|
||||||
${guardBody(t`return () => { ${terminalWrap(t, s.terminal, walk(s.body))} };`)}
|
${guardBody(t`return () => { ${terminalWrap(t, s.facetToStop, s.body)} };`)}
|
||||||
})`;
|
})`;
|
||||||
break;
|
break;
|
||||||
case 'message':
|
case 'message':
|
||||||
entity = t`{
|
entity = t`{
|
||||||
message: (${ctx.argDecl(t, '__vs', '__SYNDICATE__.AnyValue')}) => {
|
message: (${ctx.argDecl(t, '__vs', '__SYNDICATE__.AnyValue')}) => {
|
||||||
${guardBody(terminalWrap(t, s.terminal, walk(s.body)))}
|
${guardBody(terminalWrap(t, s.facetToStop, s.body))}
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
break;
|
break;
|
||||||
|
@ -294,10 +319,9 @@ ${joinItems(sa.captureBinders.map(binderTypeGuard(t)), '\n')}
|
||||||
|
|
||||||
xf(ctx.parser.messageSendStatement, (s, t) => t`message(currentSyndicateTarget, ${walk(s.expr)});`);
|
xf(ctx.parser.messageSendStatement, (s, t) => t`message(currentSyndicateTarget, ${walk(s.expr)});`);
|
||||||
|
|
||||||
x(ctx.parser.reactStatement, (s, t) => facetWrap(t, s.body));
|
x(ctx.parser.reactStatement, (s, t) => facetWrap(t, s.label ?? 'default', s.body));
|
||||||
|
|
||||||
x(ctx.parser.stopStatement, (s, t) =>
|
x(ctx.parser.stopStatement, (s, t) => t`${terminalWrap(t, s.facetToStop, s.body)};`);
|
||||||
t`__SYNDICATE__.Turn.active._stop(__SYNDICATE__.Turn.activeFacet, () => {${walk(s.body)}});`)
|
|
||||||
|
|
||||||
return tree;
|
return tree;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Token, Items, TokenBase, TokenType,
|
Token, Items, TokenBase, TokenType, Pos,
|
||||||
Pattern,
|
Pattern,
|
||||||
foldItems, match, anonymousTemplate as template, commaJoin,
|
foldItems, match, anonymousTemplate as template, commaJoin,
|
||||||
|
advancePos,
|
||||||
|
|
||||||
scope, bind, seq, alt, upTo, atom, atomString, group,
|
scope, bind, seq, seqTuple, alt, upTo, atom, atomString, group,
|
||||||
repeat, option, withoutSpace, map, mapm, rest, discard,
|
repeat, option, withoutSpace, map, mapm, rest, discard,
|
||||||
value, succeed, fail, separatedOrTerminatedBy, not,
|
value, succeed, fail, separatedOrTerminatedBy, not,
|
||||||
} from '../syntax/index.js';
|
} from '../syntax/index';
|
||||||
import * as Matcher from '../syntax/matcher.js';
|
import * as Matcher from '../syntax/matcher';
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// AST types
|
// AST types
|
||||||
|
@ -50,8 +51,14 @@ export interface StatementTurnAction extends TurnAction {
|
||||||
body: Statement;
|
body: Statement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type FacetToStop = 'default' | Expr;
|
||||||
|
|
||||||
|
export interface StopStatement extends StatementTurnAction {
|
||||||
|
facetToStop: FacetToStop;
|
||||||
|
}
|
||||||
|
|
||||||
export interface GenericEventEndpointStatement extends StatementTurnAction {
|
export interface GenericEventEndpointStatement extends StatementTurnAction {
|
||||||
terminal: boolean;
|
facetToStop: FacetToStop | 'none' | 'once-wrapper';
|
||||||
once: boolean;
|
once: boolean;
|
||||||
isDynamic: boolean;
|
isDynamic: boolean;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +97,7 @@ export interface DuringStatement extends FacetSetupAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ReactStatement extends FacetSetupAction {
|
export interface ReactStatement extends FacetSetupAction {
|
||||||
|
label: Identifier | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AtStatement {
|
export interface AtStatement {
|
||||||
|
@ -174,16 +182,29 @@ export class SyndicateParser {
|
||||||
return group('{', map(rest, items => (acc?.push(... items), items)));
|
return group('{', map(rest, items => (acc?.push(... items), items)));
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly statementBoundary = alt<any>(atom(';'), Matcher.newline);
|
readonly statementBoundary = alt<any>(
|
||||||
|
atom(';'),
|
||||||
|
Matcher.newline,
|
||||||
|
seq(Matcher.end, i => {
|
||||||
|
if (i.context === null || i.context === '{') return discard(i);
|
||||||
|
// ^ toplevel, or inside braces, so presumably statement context
|
||||||
|
return fail(i); // otherwise, parens or brackets presumably, so not statement context
|
||||||
|
}),
|
||||||
|
);
|
||||||
readonly exprBoundary = alt<any>(atom(';'), atom(','), group('{', discard), Matcher.end);
|
readonly exprBoundary = alt<any>(atom(';'), atom(','), group('{', discard), Matcher.end);
|
||||||
|
|
||||||
readonly identifier: Pattern<Identifier> = atom();
|
readonly identifier: Pattern<Identifier> = atom();
|
||||||
get binder(): Pattern<Binder> { return scope(o => bind(o, 'id', this.identifier)); }
|
binder(... _extraStops: Pattern<any>[]): Pattern<Binder> { return scope(o => bind(o, 'id', this.identifier)); }
|
||||||
|
readonly defaultBinder = this.binder();
|
||||||
|
|
||||||
expr(... extraStops: Pattern<any>[]): Pattern<Expr> {
|
expr(... extraStops: Pattern<any>[]): Pattern<Expr> {
|
||||||
return withoutSpace(upTo(alt(this.exprBoundary, ... extraStops)));
|
return withoutSpace(upTo(alt(this.exprBoundary, ... extraStops)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expr1(... extraStops: Pattern<any>[]): Pattern<Expr> {
|
||||||
|
return mapm(this.expr(... extraStops), e => e.length ? succeed(e) : fail);
|
||||||
|
}
|
||||||
|
|
||||||
propertyNameExpr(): Pattern<Expr> {
|
propertyNameExpr(): Pattern<Expr> {
|
||||||
const dq = template`"`;
|
const dq = template`"`;
|
||||||
return alt<Expr>(
|
return alt<Expr>(
|
||||||
|
@ -229,7 +250,7 @@ export class SyndicateParser {
|
||||||
map(scope(
|
map(scope(
|
||||||
(l: { b: Binder, init: Expr }) =>
|
(l: { b: Binder, init: Expr }) =>
|
||||||
seq(kw('let'),
|
seq(kw('let'),
|
||||||
bind(l, 'b', this.binder),
|
bind(l, 'b', this.defaultBinder),
|
||||||
atom('='),
|
atom('='),
|
||||||
bind(l, 'init', this.headerExpr))),
|
bind(l, 'init', this.headerExpr))),
|
||||||
l => {
|
l => {
|
||||||
|
@ -243,7 +264,7 @@ export class SyndicateParser {
|
||||||
readonly fieldDeclarationStatement: Pattern<FieldDeclarationStatement> =
|
readonly fieldDeclarationStatement: Pattern<FieldDeclarationStatement> =
|
||||||
this.turnAction(o => {
|
this.turnAction(o => {
|
||||||
return seq(atom('field'),
|
return seq(atom('field'),
|
||||||
bind(o, 'field', this.binder),
|
bind(o, 'field', this.defaultBinder),
|
||||||
option(seq(atom('='), bind(o, 'init', this.expr()))),
|
option(seq(atom('='), bind(o, 'init', this.expr()))),
|
||||||
this.statementBoundary);
|
this.statementBoundary);
|
||||||
});
|
});
|
||||||
|
@ -271,22 +292,25 @@ export class SyndicateParser {
|
||||||
|
|
||||||
mandatoryIfNotTerminal(o: GenericEventEndpointStatement, p: Pattern<any>): Pattern<any> {
|
mandatoryIfNotTerminal(o: GenericEventEndpointStatement, p: Pattern<any>): Pattern<any> {
|
||||||
return i => {
|
return i => {
|
||||||
return (o.terminal) ? option(p)(i) : p(i);
|
return (o.facetToStop !== 'none') ? option(p)(i) : p(i);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Principal: Turn
|
// Principal: Turn
|
||||||
readonly eventHandlerEndpointStatement: Pattern<EventHandlerEndpointStatement> =
|
readonly eventHandlerEndpointStatement: Pattern<EventHandlerEndpointStatement> =
|
||||||
this.turnAction(o => {
|
this.turnAction(o => {
|
||||||
o.terminal = false;
|
o.facetToStop = 'none';
|
||||||
o.once = false;
|
o.once = false;
|
||||||
o.isDynamic = true;
|
o.isDynamic = true;
|
||||||
o.body = [];
|
o.body = [];
|
||||||
return seq(alt(seq(option(map(atom('stop'), _ => o.terminal = true)),
|
return seq(alt(seq(option(seq(atom('stop'),
|
||||||
|
map(option(this.expr1(atom('on'))), es => {
|
||||||
|
o.facetToStop = es.length ? es[0] : 'default';
|
||||||
|
}))),
|
||||||
atom('on')),
|
atom('on')),
|
||||||
map(atom('once'), _ => {
|
map(atom('once'), _ => {
|
||||||
o.terminal = true;
|
|
||||||
o.once = true;
|
o.once = true;
|
||||||
|
o.facetToStop = 'once-wrapper';
|
||||||
})),
|
})),
|
||||||
alt<any>(seq(map(group('(', bind(o as DataflowEndpointStatement, 'predicate',
|
alt<any>(seq(map(group('(', bind(o as DataflowEndpointStatement, 'predicate',
|
||||||
this.expr())),
|
this.expr())),
|
||||||
|
@ -294,7 +318,7 @@ export class SyndicateParser {
|
||||||
this.mandatoryIfNotTerminal(o, this.statement(o.body))),
|
this.mandatoryIfNotTerminal(o, this.statement(o.body))),
|
||||||
mapm(seq(bind(o, 'triggerType', atomString('stop')),
|
mapm(seq(bind(o, 'triggerType', atomString('stop')),
|
||||||
option(this.statement(o.body))),
|
option(this.statement(o.body))),
|
||||||
v => o.terminal ? fail : succeed(v)),
|
v => ((o.facetToStop !== 'none') || o.once) ? fail : succeed(v)),
|
||||||
seq(bind(o, 'triggerType',
|
seq(bind(o, 'triggerType',
|
||||||
alt(atomString('asserted'),
|
alt(atomString('asserted'),
|
||||||
atomString('retracted'),
|
atomString('retracted'),
|
||||||
|
@ -311,7 +335,7 @@ export class SyndicateParser {
|
||||||
scope(o => seq(bind(o, 'expectedUse', alt(atomString('message'), atomString('assertion'))),
|
scope(o => seq(bind(o, 'expectedUse', alt(atomString('message'), atomString('assertion'))),
|
||||||
atom('type'),
|
atom('type'),
|
||||||
bind(o, 'label', this.identifier),
|
bind(o, 'label', this.identifier),
|
||||||
group('(', bind(o, 'fields', repeat(this.binder, { separator: atom(',') }))),
|
group('(', bind(o, 'fields', repeat(this.defaultBinder, { separator: atom(',') }))),
|
||||||
option(seq(atom('='),
|
option(seq(atom('='),
|
||||||
bind(o, 'wireName', withoutSpace(upTo(this.statementBoundary))))),
|
bind(o, 'wireName', withoutSpace(upTo(this.statementBoundary))))),
|
||||||
this.statementBoundary));
|
this.statementBoundary));
|
||||||
|
@ -338,12 +362,23 @@ export class SyndicateParser {
|
||||||
// Principal: Turn
|
// Principal: Turn
|
||||||
readonly reactStatement: Pattern<ReactStatement> =
|
readonly reactStatement: Pattern<ReactStatement> =
|
||||||
this.turnAction(o => {
|
this.turnAction(o => {
|
||||||
|
o.label = null;
|
||||||
o.body = [];
|
o.body = [];
|
||||||
return seq(atom('react'), this.block(o.body));
|
return seq(option(map(seqTuple(this.identifier, atom(':')),
|
||||||
|
([i, _colon]) => o.label = i)),
|
||||||
|
atom('react'),
|
||||||
|
this.block(o.body));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Principal: Turn
|
// Principal: Turn
|
||||||
readonly stopStatement = this.blockTurnAction(atom('stop'));
|
readonly stopStatement: Pattern<StopStatement> =
|
||||||
|
this.turnAction(o => {
|
||||||
|
o.facetToStop = 'default';
|
||||||
|
o.body = [];
|
||||||
|
return seq(atom('stop'),
|
||||||
|
option(map(this.expr1(), e => o.facetToStop = e)),
|
||||||
|
alt(this.block(o.body), this.statementBoundary));
|
||||||
|
});
|
||||||
|
|
||||||
// Principal: none
|
// Principal: none
|
||||||
readonly atStatement: Pattern<AtStatement> =
|
readonly atStatement: Pattern<AtStatement> =
|
||||||
|
@ -374,12 +409,22 @@ export class SyndicateParser {
|
||||||
// {expr: expr, ...} - constant
|
// {expr: expr, ...} - constant
|
||||||
// other - constant
|
// other - constant
|
||||||
|
|
||||||
readonly pCaptureBinder: Pattern<Binder> =
|
pCaptureBinder = (b: Pattern<Binder>): Pattern<Binder> =>
|
||||||
mapm(this.binder, i => {
|
mapm(b, i => {
|
||||||
return i.id.text.startsWith('$')
|
if (i.id.text.startsWith('$')) {
|
||||||
? succeed({ id: { ... i.id, text: i.id.text.slice(1) }, type: i.type })
|
const adjustedStart: Pos = { ... i.id.start };
|
||||||
: fail;
|
advancePos(adjustedStart, ' ');
|
||||||
|
const adjustedId: Token = {
|
||||||
|
... i.id,
|
||||||
|
start: adjustedStart,
|
||||||
|
text: i.id.text.slice(1),
|
||||||
|
};
|
||||||
|
return succeed({ id: adjustedId, type: i.type });
|
||||||
|
} else {
|
||||||
|
return fail;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
readonly pCaptureDefaultBinder = this.pCaptureBinder(this.defaultBinder);
|
||||||
|
|
||||||
readonly pDiscard: Pattern<void> =
|
readonly pDiscard: Pattern<void> =
|
||||||
mapm(this.identifier, i => i.text === '_' ? succeed(void 0) : fail);
|
mapm(this.identifier, i => i.text === '_' ? succeed(void 0) : fail);
|
||||||
|
@ -407,7 +452,7 @@ export class SyndicateParser {
|
||||||
|
|
||||||
hasCapturesOrDiscards(e: Expr): boolean {
|
hasCapturesOrDiscards(e: Expr): boolean {
|
||||||
return foldItems(e,
|
return foldItems(e,
|
||||||
t => match(alt<any>(this.pCaptureBinder, this.pDiscard), [t], null) !== null,
|
t => match(alt<any>(this.pCaptureDefaultBinder, this.pDiscard), [t], null, '(') !== null,
|
||||||
(_g, b, _k) => b,
|
(_g, b, _k) => b,
|
||||||
bs => bs.some(b => b));
|
bs => bs.some(b => b));
|
||||||
}
|
}
|
||||||
|
@ -470,7 +515,7 @@ export class SyndicateParser {
|
||||||
// });
|
// });
|
||||||
// } else
|
// } else
|
||||||
if (this.hasCapturesOrDiscards(o.ctor)) {
|
if (this.hasCapturesOrDiscards(o.ctor)) {
|
||||||
const r = match(this.pCaptureBinder, o.ctor, null);
|
const r = match(this.pCaptureDefaultBinder, o.ctor, null, '(');
|
||||||
if (r !== null && o.arguments.length === 1) {
|
if (r !== null && o.arguments.length === 1) {
|
||||||
return succeed({
|
return succeed({
|
||||||
type: 'PCapture',
|
type: 'PCapture',
|
||||||
|
@ -487,7 +532,7 @@ export class SyndicateParser {
|
||||||
scope<PCapture>(o => {
|
scope<PCapture>(o => {
|
||||||
o.type = 'PCapture';
|
o.type = 'PCapture';
|
||||||
o.inner = { type: 'PDiscard' };
|
o.inner = { type: 'PDiscard' };
|
||||||
return bind(o, 'binder', this.pCaptureBinder);
|
return bind(o, 'binder', this.pCaptureBinder(this.binder(... extraStops)));
|
||||||
}),
|
}),
|
||||||
map(this.expr(... extraStops), e => ({ type: 'PConstant', value: e }))
|
map(this.expr(... extraStops), e => ({ type: 'PConstant', value: e }))
|
||||||
));
|
));
|
||||||
|
@ -495,10 +540,10 @@ export class SyndicateParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SyndicateTypedParser extends SyndicateParser {
|
export class SyndicateTypedParser extends SyndicateParser {
|
||||||
get binder(): Pattern<Binder> {
|
binder(... extraStops: Pattern<any>[]): Pattern<Binder> {
|
||||||
return scope(o => seq(bind(o, 'id', this.identifier),
|
return scope(o => seq(bind(o, 'id', this.identifier),
|
||||||
option(seq(atom(':'),
|
option(seq(atom(':'),
|
||||||
bind(o, 'type', this.type(atom('=')))))));
|
bind(o, 'type', this.type(atom('='), ... extraStops))))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
export * as Grammar from './grammar.js';
|
export * as Grammar from './grammar';
|
||||||
export * as Codegen from './codegen.js';
|
export * as Codegen from './codegen';
|
||||||
export { compile, CompileOptions } from './codegen.js';
|
export { compile, CompileOptions } from './codegen';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
export * as Syntax from './syntax/index.js';
|
export * as Syntax from './syntax/index';
|
||||||
export * from './compiler/index.js';
|
export * from './compiler/index';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { Token, TokenType, Item, Items, isGroup } from './tokens.js';
|
import { Token, TokenType, Item, Items, isGroup } from './tokens';
|
||||||
import { Pos, startPos, advancePos } from './position.js';
|
import { Pos, startPos, advancePos } from './position';
|
||||||
import { vlqEncode } from './vlq.js';
|
import { vlqEncode } from './vlq';
|
||||||
import { SpanInfo } from './span.js';
|
import { SpanInfo } from './span';
|
||||||
|
|
||||||
export interface SourceMap {
|
export interface SourceMap {
|
||||||
version: 3;
|
version: 3;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
export * from './codewriter.js';
|
export * from './codewriter';
|
||||||
export * from './list.js';
|
export * from './list';
|
||||||
export * from './matcher.js';
|
export * from './matcher';
|
||||||
export * from './position.js';
|
export * from './position';
|
||||||
export * from './reader.js';
|
export * from './reader';
|
||||||
export * from './scanner.js';
|
export * from './scanner';
|
||||||
export * from './span.js';
|
export * from './span';
|
||||||
export * from './template.js';
|
export * from './template';
|
||||||
export * from './tokens.js';
|
export * from './tokens';
|
||||||
export * from './vlq.js';
|
export * from './vlq';
|
||||||
|
|
|
@ -1,26 +1,27 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
export interface List<T> extends Iterable<T> {
|
export interface List<T, C> extends Iterable<T> {
|
||||||
item: T | null;
|
item: T | null;
|
||||||
next: List<T> | null;
|
next: List<T, C> | null;
|
||||||
|
context: C;
|
||||||
|
|
||||||
toArray(): Array<T>;
|
toArray(): Array<T>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function atEnd<T>(xs: List<T>): xs is (List<T> & { item: null, next: null }) {
|
export function atEnd<T, C>(xs: List<T, C>): xs is (List<T, C> & { item: null, next: null }) {
|
||||||
return xs.item === null;
|
return xs.item === null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function notAtEnd<T>(xs: List<T>): xs is (List<T> & { item: T, next: List<T> }) {
|
export function notAtEnd<T, C>(xs: List<T, C>): xs is (List<T, C> & { item: T, next: List<T, C> }) {
|
||||||
return xs.item !== null;
|
return xs.item !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ArrayList<T> implements List<T> {
|
export class ArrayList<T, C> implements List<T, C> {
|
||||||
readonly items: Array<T>;
|
readonly items: Array<T>;
|
||||||
readonly index: number = 0;
|
readonly index: number = 0;
|
||||||
|
|
||||||
constructor(items: Array<T>, index = 0) {
|
constructor(items: Array<T>, public context: C, index = 0) {
|
||||||
this.items = items;
|
this.items = items;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
}
|
}
|
||||||
|
@ -29,9 +30,9 @@ export class ArrayList<T> implements List<T> {
|
||||||
return this.items[this.index] ?? null;
|
return this.items[this.index] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
get next(): List<T> | null {
|
get next(): List<T, C> | null {
|
||||||
if (this.index >= this.items.length) return null;
|
if (this.index >= this.items.length) return null;
|
||||||
return new ArrayList(this.items, this.index + 1);
|
return new ArrayList(this.items, this.context, this.index + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
toArray(): Array<T> {
|
toArray(): Array<T> {
|
||||||
|
@ -39,7 +40,7 @@ export class ArrayList<T> implements List<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
[Symbol.iterator](): Iterator<T> {
|
[Symbol.iterator](): Iterator<T> {
|
||||||
let i: List<T> = this;
|
let i: List<T, C> = this;
|
||||||
return {
|
return {
|
||||||
next(): IteratorResult<T> {
|
next(): IteratorResult<T> {
|
||||||
if (notAtEnd(i)) {
|
if (notAtEnd(i)) {
|
||||||
|
|
|
@ -1,34 +1,38 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Token, TokenType, Items, Item,
|
Token, TokenType, Items, Item,
|
||||||
isGroup, isToken, isSpace, isTokenType,
|
isGroup, isToken, isSpace, isTokenType,
|
||||||
} from './tokens.js';
|
} from './tokens';
|
||||||
import { Pos, startPos } from './position.js';
|
import { Pos, startPos } from './position';
|
||||||
import { List, ArrayList, atEnd, notAtEnd } from './list.js';
|
import { List, ArrayList, atEnd, notAtEnd } from './list';
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Patterns over Item
|
// Patterns over Item
|
||||||
|
|
||||||
export type PatternResult<T> = [T, List<Item>] | null;
|
export type ItemContext = string /* the opener of the containing group, if any */ | null;
|
||||||
export type Pattern<T> = (i: List<Item>) => PatternResult<T>;
|
export type ItemList = List<Item, ItemContext>;
|
||||||
|
export type PatternResult<T> = [T, ItemList] | null;
|
||||||
|
export type Pattern<T> = (i: ItemList) => PatternResult<T>;
|
||||||
|
|
||||||
export function match<T,F>(p: Pattern<T>, items: Items, failure: F): T | F {
|
export type PatternTypeArg<P> = P extends Pattern<infer T> ? T : never;
|
||||||
const r = p(new ArrayList(items));
|
|
||||||
|
export function match<T,F>(p: Pattern<T>, items: Items, failure: F, context: ItemContext): T | F {
|
||||||
|
const r = p(new ArrayList(items, context));
|
||||||
if (r === null) return failure;
|
if (r === null) return failure;
|
||||||
if (notAtEnd(skipSpace(r[1]))) return failure;
|
if (notAtEnd(skipSpace(r[1]))) return failure;
|
||||||
return r[0];
|
return r[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const noItems = new ArrayList<Item>([]);
|
export const noItems = (c: ItemContext) => new ArrayList([], c);
|
||||||
|
|
||||||
export const fail: Pattern<never> = _i => null;
|
export const fail: Pattern<never> = _i => null;
|
||||||
export function succeed<T>(t: T): Pattern<T> { return i => [t, i]; }
|
export function succeed<T>(t: T): Pattern<T> { return i => [t, i]; }
|
||||||
|
|
||||||
export const discard: Pattern<void> = _i => [void 0, noItems];
|
export const discard: Pattern<void> = i => [void 0, noItems(i.context)];
|
||||||
export const rest: Pattern<Items> = i => [i.toArray(), noItems];
|
export const rest: Pattern<Items> = i => [i.toArray(), noItems(i.context)];
|
||||||
export const end: Pattern<void> = i => atEnd(skipSpace(i)) ? [void 0, noItems] : null;
|
export const end: Pattern<void> = i => atEnd(skipSpace(i)) ? [void 0, noItems(i.context)] : null;
|
||||||
export const pos: Pattern<Pos> = i => notAtEnd(i) ? [i.item.start, i] : null;
|
export const pos: Pattern<Pos> = i => notAtEnd(i) ? [i.item.start, i] : null;
|
||||||
|
|
||||||
export const newline: Pattern<Item> = i => {
|
export const newline: Pattern<Item> = i => {
|
||||||
|
@ -37,12 +41,12 @@ export const newline: Pattern<Item> = i => {
|
||||||
return [i.item, i.next];
|
return [i.item, i.next];
|
||||||
};
|
};
|
||||||
|
|
||||||
export function skipSpace(i: List<Item>): List<Item> {
|
export function skipSpace(i: ItemList): ItemList {
|
||||||
while (notAtEnd(i) && isSpace(i.item)) i = i.next;
|
while (notAtEnd(i) && isSpace(i.item)) i = i.next;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function collectSpace(i: List<Item>, acc: Array<Item>): List<Item> {
|
export function collectSpace(i: ItemList, acc: Array<Item>): ItemList {
|
||||||
while (notAtEnd(i) && isSpace(i.item)) {
|
while (notAtEnd(i) && isSpace(i.item)) {
|
||||||
acc.push(i.item);
|
acc.push(i.item);
|
||||||
i = i.next;
|
i = i.next;
|
||||||
|
@ -78,6 +82,22 @@ export function seq(... patterns: Pattern<any>[]): Pattern<any> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function seqTuple<Patterns extends [...Pattern<any>[]]>(
|
||||||
|
... patterns: Patterns
|
||||||
|
): Pattern<{ [I in keyof Patterns]: PatternTypeArg<Patterns[I]> } & { length: Patterns['length'] }>
|
||||||
|
{
|
||||||
|
return i => {
|
||||||
|
const rs = [];
|
||||||
|
for (const p of patterns) {
|
||||||
|
const r = p(i);
|
||||||
|
if (r === null) return null;
|
||||||
|
rs.push(r[0]);
|
||||||
|
i = r[1];
|
||||||
|
}
|
||||||
|
return [rs as unknown as PatternTypeArg<ReturnType<typeof seqTuple<Patterns>>>, i];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function alt<T>(... alts: Pattern<T>[]): Pattern<T> {
|
export function alt<T>(... alts: Pattern<T>[]): Pattern<T> {
|
||||||
return i => {
|
return i => {
|
||||||
for (const a of alts) {
|
for (const a of alts) {
|
||||||
|
@ -115,7 +135,7 @@ export function bind<T, K extends keyof T>(target: T, key: K, pattern: Pattern<T
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function exec(thunk: (i: List<Item>) => void): Pattern<void> {
|
export function exec(thunk: (i: ItemList) => void): Pattern<void> {
|
||||||
return i => {
|
return i => {
|
||||||
thunk(i);
|
thunk(i);
|
||||||
return [void 0, i];
|
return [void 0, i];
|
||||||
|
@ -156,7 +176,7 @@ export function group<T>(opener: string, items: Pattern<T>, options: GroupOption
|
||||||
if (!notAtEnd(i)) return null;
|
if (!notAtEnd(i)) return null;
|
||||||
if (!isGroup(i.item)) return null;
|
if (!isGroup(i.item)) return null;
|
||||||
if (i.item.open.text !== opener) return null;
|
if (i.item.open.text !== opener) return null;
|
||||||
const r = items(new ArrayList(i.item.items));
|
const r = items(new ArrayList(i.item.items, opener));
|
||||||
if (r === null) return null;
|
if (r === null) return null;
|
||||||
if (!atEnd(r[1])) return null;
|
if (!atEnd(r[1])) return null;
|
||||||
return [r[0], (options.advance ?? true) ? i.next : i];
|
return [r[0], (options.advance ?? true) ? i.next : i];
|
||||||
|
@ -203,7 +223,7 @@ export function upTo(p: Pattern<any>): Pattern<Items> {
|
||||||
export function separatedBy<T>(itemPattern: Pattern<T>, separator: Pattern<any>): Pattern<T[]> {
|
export function separatedBy<T>(itemPattern: Pattern<T>, separator: Pattern<any>): Pattern<T[]> {
|
||||||
return i => {
|
return i => {
|
||||||
const acc: T[] = [];
|
const acc: T[] = [];
|
||||||
if (end(i) !== null) return [acc, noItems];
|
if (end(i) !== null) return [acc, noItems(i.context)];
|
||||||
while (true) {
|
while (true) {
|
||||||
{
|
{
|
||||||
const r = itemPattern(i);
|
const r = itemPattern(i);
|
||||||
|
@ -214,7 +234,7 @@ export function separatedBy<T>(itemPattern: Pattern<T>, separator: Pattern<any>)
|
||||||
{
|
{
|
||||||
const r = separator(i);
|
const r = separator(i);
|
||||||
if (r === null) {
|
if (r === null) {
|
||||||
if (end(i) !== null) return [acc, noItems];
|
if (end(i) !== null) return [acc, noItems(i.context)];
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
i = r[1];
|
i = r[1];
|
||||||
|
@ -229,7 +249,7 @@ export function separatedOrTerminatedBy<T>(
|
||||||
): Pattern<T[]> {
|
): Pattern<T[]> {
|
||||||
return i => {
|
return i => {
|
||||||
const acc: T[] = [];
|
const acc: T[] = [];
|
||||||
if (end(i) !== null) return [acc, noItems];
|
if (end(i) !== null) return [acc, noItems(i.context)];
|
||||||
while (true) {
|
while (true) {
|
||||||
{
|
{
|
||||||
const r = itemPattern(i);
|
const r = itemPattern(i);
|
||||||
|
@ -240,11 +260,11 @@ export function separatedOrTerminatedBy<T>(
|
||||||
{
|
{
|
||||||
const r = separator(i);
|
const r = separator(i);
|
||||||
if (r === null) {
|
if (r === null) {
|
||||||
if (end(i) !== null) return [acc, noItems];
|
if (end(i) !== null) return [acc, noItems(i.context)];
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
i = r[1];
|
i = r[1];
|
||||||
if (end(i) !== null) return [acc, noItems];
|
if (end(i) !== null) return [acc, noItems(i.context)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -290,12 +310,13 @@ export function option<T>(p: Pattern<T>): Pattern<T[]> {
|
||||||
|
|
||||||
export function replace<T>(
|
export function replace<T>(
|
||||||
items: Items,
|
items: Items,
|
||||||
|
outerContext: ItemContext,
|
||||||
p: Pattern<T>,
|
p: Pattern<T>,
|
||||||
f: (t: T, start: Pos, end: Pos) => Items,
|
f: (t: T, start: Pos, end: Pos) => Items,
|
||||||
end: Pos = items.length > 0 ? items[items.length - 1].end : startPos(null)) : Items
|
end: Pos = items.length > 0 ? items[items.length - 1].end : startPos(null),
|
||||||
{
|
) : Items {
|
||||||
const walkItems = (items: Items, end: Pos): Items => {
|
const walkItems = (items: Items, end: Pos, context: ItemContext): Items => {
|
||||||
let i: List<Item> = new ArrayList(items);
|
let i: ItemList = new ArrayList(items, context);
|
||||||
const acc: Items = [];
|
const acc: Items = [];
|
||||||
while (notAtEnd(i = collectSpace(i, acc))) {
|
while (notAtEnd(i = collectSpace(i, acc))) {
|
||||||
const r = p(i);
|
const r = p(i);
|
||||||
|
@ -309,11 +330,14 @@ export function replace<T>(
|
||||||
acc.push(i.item);
|
acc.push(i.item);
|
||||||
i = i.next;
|
i = i.next;
|
||||||
} else {
|
} else {
|
||||||
acc.push({ ... i.item, items: walkItems(i.item.items, i.item.end) });
|
acc.push({
|
||||||
|
... i.item,
|
||||||
|
items: walkItems(i.item.items, i.item.end, i.item.open.text),
|
||||||
|
});
|
||||||
i = i.next;
|
i = i.next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
};
|
};
|
||||||
return walkItems(items, end);
|
return walkItems(items, end, outerContext);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
export interface Pos {
|
export interface Pos {
|
||||||
line: number;
|
line: number;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { TokenType, Token, Group, GroupInProgress, Item, Items, finishGroup } from './tokens.js';
|
import { TokenType, Token, Group, GroupInProgress, Item, Items, finishGroup } from './tokens';
|
||||||
import { Pos, startPos } from './position.js';
|
import { Pos, startPos } from './position';
|
||||||
import { Scanner, StringScanner } from './scanner.js';
|
import { Scanner, StringScanner } from './scanner';
|
||||||
|
|
||||||
function matchingParen(c: string): string | null {
|
function matchingParen(c: string): string | null {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
@ -134,23 +134,10 @@ export class LaxReader implements IterableIterator<Item> {
|
||||||
case TokenType.SPACE:
|
case TokenType.SPACE:
|
||||||
case TokenType.NEWLINE:
|
case TokenType.NEWLINE:
|
||||||
case TokenType.ATOM:
|
case TokenType.ATOM:
|
||||||
|
this.drop();
|
||||||
if (g === null) {
|
if (g === null) {
|
||||||
this.drop();
|
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
if (t.text === ';') {
|
|
||||||
while ('(['.indexOf(g.open.text) >= 0) {
|
|
||||||
this.stack.pop();
|
|
||||||
const outer = this.stackTop();
|
|
||||||
if (outer === null) {
|
|
||||||
// do not drop the semicolon here
|
|
||||||
return finishGroup(g, t.start);
|
|
||||||
}
|
|
||||||
outer.items.push(finishGroup(g, t.start));
|
|
||||||
g = outer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.drop();
|
|
||||||
g.items.push(t);
|
g.items.push(t);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { TokenType, Token, Item, GroupInProgress } from './tokens.js';
|
import { TokenType, Token, Item, GroupInProgress } from './tokens';
|
||||||
import { Pos, advancePos } from './position.js';
|
import { Pos, advancePos } from './position';
|
||||||
|
|
||||||
export abstract class Scanner implements IterableIterator<Token> {
|
export abstract class Scanner implements IterableIterator<Token> {
|
||||||
readonly pos: Pos;
|
readonly pos: Pos;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
export class SpanResult<T> {
|
export class SpanResult<T> {
|
||||||
readonly searchTarget: number;
|
readonly searchTarget: number;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { Items } from './tokens.js';
|
import { Items } from './tokens';
|
||||||
import { Pos, startPos } from './position.js';
|
import { Pos, startPos } from './position';
|
||||||
import { laxRead, LaxReadOptions } from './reader.js';
|
import { laxRead, LaxReadOptions } from './reader';
|
||||||
import * as M from './matcher.js';
|
import * as M from './matcher';
|
||||||
|
|
||||||
const substPat = M.scope((o: { pos: Pos }) =>
|
const substPat = M.scope((o: { pos: Pos }) =>
|
||||||
M.seq(M.atom('$'),
|
M.seq(M.atom('$'),
|
||||||
|
@ -29,7 +29,7 @@ export class Templates {
|
||||||
this.readOptions = readOptions;
|
this.readOptions = readOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
template(start0: Pos | string = this.defaultPos): TemplateFunction {
|
template(start0: Pos | string = this.defaultPos, context: M.ItemContext = null): TemplateFunction {
|
||||||
const start = (typeof start0 === 'string') ? startPos(start0) : start0;
|
const start = (typeof start0 === 'string') ? startPos(start0) : start0;
|
||||||
return (consts, ... vars) => {
|
return (consts, ... vars) => {
|
||||||
const sourcePieces = [consts[0]];
|
const sourcePieces = [consts[0]];
|
||||||
|
@ -53,6 +53,7 @@ export class Templates {
|
||||||
(this.readOptions.extraDelimiters ?? '') + '$',
|
(this.readOptions.extraDelimiters ?? '') + '$',
|
||||||
synthetic: true,
|
synthetic: true,
|
||||||
}),
|
}),
|
||||||
|
context,
|
||||||
substPat,
|
substPat,
|
||||||
sub => toItems(this.readOptions, vars[i++], sub.pos));
|
sub => toItems(this.readOptions, vars[i++], sub.pos));
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import { Pos } from './position.js';
|
import { Pos } from './position';
|
||||||
|
|
||||||
export enum TokenType {
|
export enum TokenType {
|
||||||
SPACE,
|
SPACE,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
const inverse_alphabet =
|
const inverse_alphabet =
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2023-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
const __SYNDICATE__ = Syndicate;
|
const __SYNDICATE__ = Syndicate;
|
||||||
const currentSyndicateTarget = Syndicate.Dataspace.global;
|
const currentSyndicateTarget = Syndicate.Dataspace.global;
|
||||||
|
@ -20,7 +20,7 @@ const currentSyndicateTarget = Syndicate.Dataspace.global;
|
||||||
const sourceCode = sourceUrl ? await (await fetch(sourceUrl)).text() : script.innerHTML;
|
const sourceCode = sourceUrl ? await (await fetch(sourceUrl)).text() : script.innerHTML;
|
||||||
|
|
||||||
const compilationResult = SyndicateCompiler.compile({
|
const compilationResult = SyndicateCompiler.compile({
|
||||||
name: sourceUrl || 'anonymous-script-tag',
|
name: sourceUrl || script.id || 'anonymous-script-tag',
|
||||||
source: sourceCode,
|
source: sourceCode,
|
||||||
module: isModule ? 'es6' : 'none',
|
module: isModule ? 'es6' : 'none',
|
||||||
runtime: isModule ? void 0 : 'Syndicate',
|
runtime: isModule ? void 0 : 'Syndicate',
|
||||||
|
|
|
@ -0,0 +1,213 @@
|
||||||
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
/// SPDX-FileCopyrightText: Copyright © 2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
|
import { compile, CompileOptions, Syntax } from '../src/index';
|
||||||
|
import Pos = Syntax.Pos;
|
||||||
|
import './test-utils';
|
||||||
|
import { js as format } from 'js-beautify';
|
||||||
|
|
||||||
|
type Error = { message: string, start: Pos | undefined, end: Pos | undefined };
|
||||||
|
|
||||||
|
function translate(source: string, options: Partial<CompileOptions> = {}): { code: string, errors: Error[] } {
|
||||||
|
const errors: Error[] = [];
|
||||||
|
const result = compile({
|
||||||
|
... options,
|
||||||
|
module: 'none',
|
||||||
|
source,
|
||||||
|
emitError: (message, start, end) => errors.push({ message, start, end }),
|
||||||
|
});
|
||||||
|
return { code: result.text, errors };
|
||||||
|
}
|
||||||
|
|
||||||
|
function translateNoErrors(source: string, options?: Partial<CompileOptions>): string {
|
||||||
|
const o = translate(source, options);
|
||||||
|
expect(o.errors.length).toBe(0);
|
||||||
|
return o.code;
|
||||||
|
}
|
||||||
|
|
||||||
|
function expectCodeEqual(input: string, output: string, options?: Partial<CompileOptions>) {
|
||||||
|
expect(format(translateNoErrors(input, options))).toBe(format(output));
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('react', () => {
|
||||||
|
|
||||||
|
it('without label', () => expectCodeEqual(`react { a; b; c; }`, `
|
||||||
|
__SYNDICATE__.Turn.active.facet(() => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
a; b; c;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('with label', () => expectCodeEqual(`someLabel: react { a; b; c; }`, `
|
||||||
|
__SYNDICATE__.Turn.active.facet(() => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
const someLabel = currentSyndicateFacet;
|
||||||
|
a; b; c;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('spawn', () => {
|
||||||
|
|
||||||
|
it('without name', () => expectCodeEqual(`spawn { a; b; c; }`, `
|
||||||
|
__SYNDICATE__.Dataspace._spawn(() => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
a; b; c;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('with name', () => expectCodeEqual(`spawn named 'foo' { a; b; c; }`, `
|
||||||
|
__SYNDICATE__.Dataspace._spawn(() => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
currentSyndicateFacet.actor.name = 'foo';
|
||||||
|
a; b; c;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
// At present, the expr() parser accepts *empty input*. TODO: something better.
|
||||||
|
it('with missing name (known incorrect parsing and codegen)', () =>
|
||||||
|
expectCodeEqual(`spawn named { a; b; c; }`, `
|
||||||
|
__SYNDICATE__.Dataspace._spawn(() => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
currentSyndicateFacet.actor.name = ;
|
||||||
|
a; b; c;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('stop', () => {
|
||||||
|
|
||||||
|
it('non-statement', () => expectCodeEqual(`(stop)`, `(stop)`));
|
||||||
|
it('toplevel end-delimited statement', () => expectCodeEqual(`stop`, `
|
||||||
|
__SYNDICATE__.Turn.active._stop(currentSyndicateFacet, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
});`));
|
||||||
|
it('nested end-delimited statement', () => expectCodeEqual(`{ stop }`, `
|
||||||
|
{
|
||||||
|
__SYNDICATE__.Turn.active._stop(currentSyndicateFacet, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
});
|
||||||
|
}`));
|
||||||
|
|
||||||
|
it('without facet, without body', () => expectCodeEqual(`stop;`, `
|
||||||
|
__SYNDICATE__.Turn.active._stop(currentSyndicateFacet, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('without facet, empty body', () => expectCodeEqual(`stop {}`, `
|
||||||
|
__SYNDICATE__.Turn.active._stop(currentSyndicateFacet, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('without facet, non-empty body', () => expectCodeEqual(`stop { a; b; }`, `
|
||||||
|
__SYNDICATE__.Turn.active._stop(currentSyndicateFacet, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
a; b;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('with facet, without body', () => expectCodeEqual(`stop x.y;`, `
|
||||||
|
__SYNDICATE__.Turn.active._stop(x.y, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('with facet, empty body', () => expectCodeEqual(`stop x.y {}`, `
|
||||||
|
__SYNDICATE__.Turn.active._stop(x.y, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('with facet, non-empty body', () => expectCodeEqual(`stop x.y { a; b; }`, `
|
||||||
|
__SYNDICATE__.Turn.active._stop(x.y, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
a; b;
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('nested stop, no labels', () => expectCodeEqual(`stop { stop; }`, `
|
||||||
|
__SYNDICATE__.Turn.active._stop(currentSyndicateFacet, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
__SYNDICATE__.Turn.active._stop(currentSyndicateFacet, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
});
|
||||||
|
});`));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('during', () => {
|
||||||
|
|
||||||
|
it('stop in body', () => expectCodeEqual(`during P => { a; stop; b; }`, `
|
||||||
|
__SYNDICATE__.Turn.active.assertDataflow(() => ({
|
||||||
|
target: currentSyndicateTarget,
|
||||||
|
assertion: __SYNDICATE__.Observe({
|
||||||
|
pattern: __SYNDICATE__.QuasiValue.finish((__SYNDICATE__.QuasiValue.lit(__SYNDICATE__.fromJS(P)))),
|
||||||
|
observer: __SYNDICATE__.Turn.ref(__SYNDICATE__.assertionFacetObserver(
|
||||||
|
(__vs) => {
|
||||||
|
if (Array.isArray(__vs)) {
|
||||||
|
|
||||||
|
a;
|
||||||
|
__SYNDICATE__.Turn.active._stop(currentSyndicateFacet, () => {
|
||||||
|
const currentSyndicateFacet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
});
|
||||||
|
b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
))
|
||||||
|
})
|
||||||
|
}));`));
|
||||||
|
|
||||||
|
it('capture with type at top', () => expectCodeEqual(`during $v: T => { ok() }`, `
|
||||||
|
__SYNDICATE__.Turn.active.assertDataflow(() => ({
|
||||||
|
target: currentSyndicateTarget,
|
||||||
|
assertion: __SYNDICATE__.Observe({
|
||||||
|
pattern: __SYNDICATE__.QuasiValue.finish((__SYNDICATE__.QuasiValue.bind((__SYNDICATE__.QuasiValue._)))),
|
||||||
|
observer: __SYNDICATE__.Turn.ref(__SYNDICATE__.assertionFacetObserver(
|
||||||
|
(__vs: __SYNDICATE__.AnyValue) => {
|
||||||
|
if (Array.isArray(__vs)) {
|
||||||
|
const __v_0 = T.__from_preserve__(__vs[0]);
|
||||||
|
if (__v_0 === void 0) return;
|
||||||
|
const v = __v_0;
|
||||||
|
ok()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
))
|
||||||
|
})
|
||||||
|
}));
|
||||||
|
`, { typescript: true }));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('once', () => {
|
||||||
|
it('basics with block', () => expectCodeEqual(`once asserted P => { a; b; }`, `
|
||||||
|
__SYNDICATE__.Turn.active.facet(() => {
|
||||||
|
const __once_facet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
__SYNDICATE__.Turn.active.assertDataflow(() => ({
|
||||||
|
target: currentSyndicateTarget,
|
||||||
|
assertion: __SYNDICATE__.Observe({
|
||||||
|
pattern: __SYNDICATE__.QuasiValue.finish((__SYNDICATE__.QuasiValue.lit(__SYNDICATE__.fromJS(P)))),
|
||||||
|
observer: __SYNDICATE__.Turn.ref({
|
||||||
|
assert: (__vs, __handle) => {
|
||||||
|
if (Array.isArray(__vs)) {
|
||||||
|
|
||||||
|
__SYNDICATE__.Turn.active._stop(__once_facet, () => { a; b; })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
}));
|
||||||
|
});`));
|
||||||
|
|
||||||
|
it('basics with statement', () => expectCodeEqual(`once asserted P => x;`, `
|
||||||
|
__SYNDICATE__.Turn.active.facet(() => {
|
||||||
|
const __once_facet = __SYNDICATE__.Turn.activeFacet;
|
||||||
|
__SYNDICATE__.Turn.active.assertDataflow(() => ({
|
||||||
|
target: currentSyndicateTarget,
|
||||||
|
assertion: __SYNDICATE__.Observe({
|
||||||
|
pattern: __SYNDICATE__.QuasiValue.finish((__SYNDICATE__.QuasiValue.lit(__SYNDICATE__.fromJS(P)))),
|
||||||
|
observer: __SYNDICATE__.Turn.ref({
|
||||||
|
assert: (__vs, __handle) => {
|
||||||
|
if (Array.isArray(__vs)) {
|
||||||
|
|
||||||
|
__SYNDICATE__.Turn.active._stop(__once_facet, () => {x;})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
}));
|
||||||
|
});`));
|
||||||
|
|
||||||
|
});
|
|
@ -0,0 +1,30 @@
|
||||||
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
/// SPDX-FileCopyrightText: Copyright © 2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
|
import { Grammar, Syntax } from '../src/index';
|
||||||
|
import './test-utils';
|
||||||
|
|
||||||
|
describe('statement boundary', () => {
|
||||||
|
function stmt(input: string): [string, string] | null {
|
||||||
|
const parser = new Grammar.SyndicateParser();
|
||||||
|
const tree = Syntax.laxRead(input);
|
||||||
|
const items: Syntax.Items = [];
|
||||||
|
const r = parser.statement(items)(new Syntax.ArrayList(tree, '{'));
|
||||||
|
if (r === null) return null;
|
||||||
|
return [Syntax.itemText(items), Syntax.itemText(r[1].toArray())];
|
||||||
|
}
|
||||||
|
|
||||||
|
it('should include semicolon', () => {
|
||||||
|
expect(stmt('i am a statement ; ')).toEqual(['i am a statement;', ' ']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should include newline', () => {
|
||||||
|
expect(stmt('i am a statement \n ')).toEqual(['i am a statement\n', ' ']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should include closing brace on the same line', () => {
|
||||||
|
// Note that `" remainder is in outer group"` is discarded by `laxRead`.
|
||||||
|
expect(stmt('i am a statement } remainder is in outer group'))
|
||||||
|
.toEqual(['i am a statement', '']);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,38 @@
|
||||||
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
|
import { is, preserves } from '@preserves/core';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
namespace jest {
|
||||||
|
interface Matchers<R> {
|
||||||
|
is(expected: any): R;
|
||||||
|
toThrowFilter(f: (e: Error) => boolean): R;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
expect.extend({
|
||||||
|
is(actual, expected) {
|
||||||
|
return is(actual, expected)
|
||||||
|
? { message: () => preserves`expected ${actual} not to be Preserves.is to ${expected}`,
|
||||||
|
pass: true }
|
||||||
|
: { message: () => preserves`expected ${actual} to be Preserves.is to ${expected}`,
|
||||||
|
pass: false };
|
||||||
|
},
|
||||||
|
|
||||||
|
toThrowFilter(thunk, f) {
|
||||||
|
try {
|
||||||
|
thunk();
|
||||||
|
return { message: () => preserves`expected an exception`, pass: false };
|
||||||
|
} catch (e) {
|
||||||
|
if (f(e)) {
|
||||||
|
return { message: () => preserves`expected an exception not matching the filter`,
|
||||||
|
pass: true };
|
||||||
|
} else {
|
||||||
|
return { message: () => preserves`expected an exception matching the filter: ${(e as any)?.constructor?.name}`,
|
||||||
|
pass: false };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Pattern as P,
|
Pattern as P,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env -S npx ts-node -O '{"module": "commonjs"}'
|
#!/usr/bin/env -S npx ts-node -O '{"module": "commonjs"}'
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Pattern as P,
|
Pattern as P,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/// SPDX-License-Identifier: GPL-3.0-or-later
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
/// SPDX-FileCopyrightText: Copyright © 2016-2024 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
preset: 'ts-jest',
|
preset: 'ts-jest',
|
||||||
|
|
|
@ -5,10 +5,10 @@ ActionDescription =
|
||||||
/ @spawnActor <spawn-actor @detail OptionalAny @initialAssertions #{protocol.Handle}>
|
/ @spawnActor <spawn-actor @detail OptionalAny @initialAssertions #{protocol.Handle}>
|
||||||
/ @stopActor <stop-actor @error OptionalAny>
|
/ @stopActor <stop-actor @error OptionalAny>
|
||||||
/ @inertCheck <inert-check>
|
/ @inertCheck <inert-check>
|
||||||
/ <assert @target #!any @crossSpace bool @handle protocol.Handle @assertion any>
|
/ <assert @target #:any @crossSpace bool @handle protocol.Handle @assertion any>
|
||||||
/ <retract @target #!any @crossSpace bool @handle protocol.Handle>
|
/ <retract @target #:any @crossSpace bool @handle protocol.Handle>
|
||||||
/ <message @target #!any @assertion any>
|
/ <message @target #:any @assertion any>
|
||||||
/ <sync @target #!any @callback #!any>
|
/ <sync @target #:any @callback #:any>
|
||||||
.
|
.
|
||||||
|
|
||||||
OptionalAny = <none> / <some @value any> .
|
OptionalAny = <none> / <some @value any> .
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@syndicate-lang/core",
|
"name": "@syndicate-lang/core",
|
||||||
"version": "0.23.0",
|
"version": "0.32.0",
|
||||||
"description": "Syndicate/JS for browser and node.js",
|
"description": "Syndicate/JS for browser and node.js",
|
||||||
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/core",
|
"homepage": "https://github.com/syndicate-lang/syndicate-js/tree/main/packages/core",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
"rollup:watch": "../../node_modules/.bin/rollup -c -w",
|
"rollup:watch": "../../node_modules/.bin/rollup -c -w",
|
||||||
"test": "../../node_modules/.bin/jest",
|
"test": "../../node_modules/.bin/jest",
|
||||||
"cover": "../../node_modules/.bin/nyc --reporter=html ../../node_modules/.bin/jest",
|
"cover": "../../node_modules/.bin/nyc --reporter=html ../../node_modules/.bin/jest",
|
||||||
"clean": "rm -rf lib dist",
|
"clean": "rm -rf lib dist ./src/gen",
|
||||||
"veryclean": "yarn run clean && rm -rf node_modules"
|
"veryclean": "yarn run clean && rm -rf node_modules"
|
||||||
},
|
},
|
||||||
"main": "dist/syndicate.js",
|
"main": "dist/syndicate.js",
|
||||||
|
@ -29,11 +29,11 @@
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@preserves/core": "0.992.4",
|
"@preserves/core": "0.995.200",
|
||||||
"@preserves/schema-cli": "0.992.5"
|
"@preserves/schema-cli": "0.995.201"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@preserves/core": "0.992.4"
|
"@preserves/core": "0.995.200"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"salty-crypto": "0.3.1"
|
"salty-crypto": "0.3.1"
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
tcp-remote„´³tupleµ´³named³host´³atom³String„„´³named³port´³atom³
SignedInteger„„„„„³TcpPeerInfo´³rec´³lit³tcp-peer„´³tupleµ´³named³handle´³embedded³any„„´³named³local´³refµ„³TcpLocal„„´³named³remote´³refµ„³ TcpRemote„„„„„„³embeddedType´³refµ³ EntityRef„³Cap„„„µ³http„´³schema·³version°³definitions·³Chunk´³orµµ±string´³atom³String„„µ±bytes´³atom³
|
tcp-remote„´³tupleµ´³named³host´³atom³String„„´³named³port´³atom³
SignedInteger„„„„„³TcpPeerInfo´³rec´³lit³tcp-peer„´³tupleµ´³named³handle´³embedded³any„„´³named³local´³refµ„³TcpLocal„„´³named³remote´³refµ„³ TcpRemote„„„„„„³embeddedType´³refµ³ EntityRef„³Cap„„„µ³http„´³schema·³version°³definitions·³Chunk´³orµµ±string´³atom³String„„µ±bytes´³atom³
|
||||||
ByteString„„„„³Headers´³dictof´³atom³Symbol„´³atom³String„„³MimeType´³atom³Symbol„³
|
ByteString„„„„³Headers´³dictof´³atom³Symbol„´³atom³String„„³MimeType´³atom³Symbol„³
|
||||||
QueryValue´³orµµ±string´³atom³String„„µ±file´³rec´³lit³file„´³tupleµ´³named³filename´³atom³String„„´³named³headers´³refµ„³Headers„„´³named³body´³atom³
|
QueryValue´³orµµ±string´³atom³String„„µ±file´³rec´³lit³file„´³tupleµ´³named³filename´³atom³String„„´³named³headers´³refµ„³Headers„„´³named³body´³atom³
|
||||||
ByteString„„„„„„„„³HostPattern´³orµµ±host´³atom³String„„µ±any´³lit€„„„„³HttpBinding´³rec´³lit³ http-bind„´³tupleµ´³named³host´³refµ„³HostPattern„„´³named³port´³atom³
SignedInteger„„´³named³method´³refµ„³
MethodPattern„„´³named³path´³refµ„³PathPattern„„´³named³handler´³embedded´³refµ„³HttpRequest„„„„„„³HttpContext´³rec´³lit³request„´³tupleµ´³named³req´³refµ„³HttpRequest„„´³named³res´³embedded´³refµ„³HttpResponse„„„„„„³HttpRequest´³rec´³lit³http-request„´³tupleµ´³named³sequenceNumber´³atom³
SignedInteger„„´³named³host´³atom³String„„´³named³port´³atom³
SignedInteger„„´³named³method´³atom³Symbol„„´³named³path´³seqof´³atom³String„„„´³named³headers´³refµ„³Headers„„´³named³query´³dictof´³atom³Symbol„´³seqof´³refµ„³
|
ByteString„„„„„„„„³HostPattern´³orµµ±host´³atom³String„„µ±any´³lit€„„„„³HttpBinding´³rec´³lit³ http-bind„´³tupleµ´³named³host´³refµ„³HostPattern„„´³named³port´³atom³
SignedInteger„„´³named³method´³refµ„³
MethodPattern„„´³named³path´³refµ„³PathPattern„„´³named³handler´³embedded´³refµ„³HttpRequest„„„„„„³HttpContext´³rec´³lit³request„´³tupleµ´³named³req´³refµ„³HttpRequest„„´³named³res´³embedded´³refµ„³HttpResponse„„„„„„³HttpRequest´³rec´³lit³http-request„´³tupleµ´³named³sequenceNumber´³atom³
SignedInteger„„´³named³host´³refµ„³RequestHost„„´³named³port´³atom³
SignedInteger„„´³named³method´³atom³Symbol„„´³named³path´³seqof´³atom³String„„„´³named³headers´³refµ„³Headers„„´³named³query´³dictof´³atom³Symbol„´³seqof´³refµ„³
|
||||||
QueryValue„„„„´³named³body´³refµ„³RequestBody„„„„„³HttpService´³rec´³lit³http-service„´³tupleµ´³named³host´³refµ„³HostPattern„„´³named³port´³atom³
SignedInteger„„´³named³method´³refµ„³
MethodPattern„„´³named³path´³refµ„³PathPattern„„„„„³PathPattern´³seqof´³refµ„³PathPatternElement„„³RequestBody´³orµµ±present´³atom³
|
QueryValue„„„„´³named³body´³refµ„³RequestBody„„„„„³HttpService´³rec´³lit³http-service„´³tupleµ´³named³host´³refµ„³HostPattern„„´³named³port´³atom³
SignedInteger„„´³named³method´³refµ„³
MethodPattern„„´³named³path´³refµ„³PathPattern„„„„„³PathPattern´³seqof´³refµ„³PathPatternElement„„³RequestBody´³orµµ±present´³atom³
|
||||||
ByteString„„µ±absent´³lit€„„„„³HttpListener´³rec´³lit³
http-listener„´³tupleµ´³named³port´³atom³
SignedInteger„„„„„³HttpResponse´³orµµ±status´³rec´³lit³status„´³tupleµ´³named³code´³atom³
SignedInteger„„´³named³message´³atom³String„„„„„„µ±header´³rec´³lit³header„´³tupleµ´³named³name´³atom³Symbol„„´³named³value´³atom³String„„„„„„µ±chunk´³rec´³lit³chunk„´³tupleµ´³named³chunk´³refµ„³Chunk„„„„„„µ±done´³rec´³lit³done„´³tupleµ´³named³chunk´³refµ„³Chunk„„„„„„„„³
MethodPattern´³orµµ±any´³lit€„„µ±specific´³atom³Symbol„„„„³PathPatternElement´³orµµ±label´³atom³String„„µ±wildcard´³lit³_„„µ±rest´³lit³...„„„„„³embeddedType€„„µ³noise„´³schema·³version°³definitions·³Packet´³orµµ±complete´³atom³
|
ByteString„„µ±absent´³lit€„„„„³RequestHost´³orµµ±present´³atom³String„„µ±absent´³lit€„„„„³HttpListener´³rec´³lit³
http-listener„´³tupleµ´³named³port´³atom³
SignedInteger„„„„„³HttpResponse´³orµµ±status´³rec´³lit³status„´³tupleµ´³named³code´³atom³
SignedInteger„„´³named³message´³atom³String„„„„„„µ±header´³rec´³lit³header„´³tupleµ´³named³name´³atom³Symbol„„´³named³value´³atom³String„„„„„„µ±chunk´³rec´³lit³chunk„´³tupleµ´³named³chunk´³refµ„³Chunk„„„„„„µ±done´³rec´³lit³done„´³tupleµ´³named³chunk´³refµ„³Chunk„„„„„„„„³
MethodPattern´³orµµ±any´³lit€„„µ±specific´³atom³Symbol„„„„³PathPatternElement´³orµµ±label´³atom³String„„µ±wildcard´³lit³_„„µ±rest´³lit³...„„„„„³embeddedType€„„µ³noise„´³schema·³version°³definitions·³Packet´³orµµ±complete´³atom³
|
||||||
ByteString„„µ±
|
ByteString„„µ±
|
||||||
fragmented´³seqof´³atom³
|
fragmented´³seqof´³atom³
|
||||||
ByteString„„„„„³ NoiseSpec´³andµ´³dict·³key´³named³key´³atom³
|
ByteString„„„„„³ Initiator´³rec´³lit³ initiator„´³tupleµ´³named³initiatorSession´³embedded´³refµ„³Packet„„„„„„³ NoiseSpec´³andµ´³dict·³key´³named³key´³atom³
|
||||||
ByteString„„³service´³named³service´³refµ„³ServiceSelector„„„„´³named³protocol´³refµ„³
NoiseProtocol„„´³named³
preSharedKeys´³refµ„³NoisePreSharedKeys„„„„³
NoiseProtocol´³orµµ±present´³dict·³protocol´³named³protocol´³atom³String„„„„„µ±invalid´³dict·³protocol´³named³protocol³any„„„„µ±absent´³dict·„„„„„³
NoiseStepType´³lit³noise„³SecretKeyField´³orµµ±present´³dict·³ secretKey´³named³ secretKey´³atom³
|
ByteString„„³service´³named³service´³refµ„³ServiceSelector„„„„´³named³protocol´³refµ„³
NoiseProtocol„„´³named³
preSharedKeys´³refµ„³NoisePreSharedKeys„„„„³SessionItem´³orµµ± Initiator´³refµ„³ Initiator„„µ±Packet´³refµ„³Packet„„„„³
NoiseProtocol´³orµµ±present´³dict·³protocol´³named³protocol´³atom³String„„„„„µ±invalid´³dict·³protocol´³named³protocol³any„„„„µ±absent´³dict·„„„„„³
NoiseStepType´³lit³noise„³SecretKeyField´³orµµ±present´³dict·³ secretKey´³named³ secretKey´³atom³
|
||||||
ByteString„„„„„µ±invalid´³dict·³ secretKey´³named³ secretKey³any„„„„µ±absent´³dict·„„„„„³DefaultProtocol´³lit±!Noise_NK_25519_ChaChaPoly_BLAKE2s„³NoiseStepDetail´³refµ„³ServiceSelector„³ServiceSelector³any³NoiseServiceSpec´³andµ´³named³base´³refµ„³ NoiseSpec„„´³named³ secretKey´³refµ„³SecretKeyField„„„„³NoisePreSharedKeys´³orµµ±present´³dict·³
preSharedKeys´³named³
preSharedKeys´³seqof´³atom³
|
ByteString„„„„„µ±invalid´³dict·³ secretKey´³named³ secretKey³any„„„„µ±absent´³dict·„„„„„³DefaultProtocol´³lit±!Noise_NK_25519_ChaChaPoly_BLAKE2s„³NoiseStepDetail´³refµ„³ServiceSelector„³ServiceSelector³any³NoiseServiceSpec´³andµ´³named³base´³refµ„³ NoiseSpec„„´³named³ secretKey´³refµ„³SecretKeyField„„„„³NoisePreSharedKeys´³orµµ±present´³dict·³
preSharedKeys´³named³
preSharedKeys´³seqof´³atom³
|
||||||
ByteString„„„„„„µ±invalid´³dict·³
preSharedKeys´³named³
preSharedKeys³any„„„„µ±absent´³dict·„„„„„³NoisePathStepDetail´³refµ„³ NoiseSpec„³NoiseDescriptionDetail´³refµ„³NoiseServiceSpec„„³embeddedType€„„µ³timer„´³schema·³version°³definitions·³SetTimer´³rec´³lit³ set-timer„´³tupleµ´³named³label³any„´³named³seconds´³atom³Double„„´³named³kind´³refµ„³ TimerKind„„„„„³ LaterThan´³rec´³lit³
|
ByteString„„„„„„µ±invalid´³dict·³
preSharedKeys´³named³
preSharedKeys³any„„„„µ±absent´³dict·„„„„„³NoisePathStepDetail´³refµ„³ NoiseSpec„³NoiseDescriptionDetail´³refµ„³NoiseServiceSpec„„³embeddedType´³refµ³ EntityRef„³Cap„„„µ³timer„´³schema·³version°³definitions·³SetTimer´³rec´³lit³ set-timer„´³tupleµ´³named³label³any„´³named³seconds´³atom³Double„„´³named³kind´³refµ„³ TimerKind„„„„„³ LaterThan´³rec´³lit³
|
||||||
later-than„´³tupleµ´³named³seconds´³atom³Double„„„„„³ TimerKind´³orµµ±relative´³lit³relative„„µ±absolute´³lit³absolute„„µ±clear´³lit³clear„„„„³TimerExpired´³rec´³lit³
timer-expired„´³tupleµ´³named³label³any„´³named³seconds´³atom³Double„„„„„„³embeddedType€„„µ³trace„´³schema·³version°³definitions·³Oid³any³Name´³orµµ± anonymous´³rec´³lit³ anonymous„´³tupleµ„„„„µ±named´³rec´³lit³named„´³tupleµ´³named³name³any„„„„„„„³Target´³rec´³lit³entity„´³tupleµ´³named³actor´³refµ„³ActorId„„´³named³facet´³refµ„³FacetId„„´³named³oid´³refµ„³Oid„„„„„³TaskId³any³TurnId³any³ActorId³any³FacetId³any³ TurnCause´³orµµ±turn´³rec´³lit³ caused-by„´³tupleµ´³named³id´³refµ„³TurnId„„„„„„µ±cleanup´³rec´³lit³cleanup„´³tupleµ„„„„µ±linkedTaskRelease´³rec´³lit³linked-task-release„´³tupleµ´³named³id´³refµ„³TaskId„„´³named³reason´³refµ„³LinkedTaskReleaseReason„„„„„„µ±periodicActivation´³rec´³lit³periodic-activation„´³tupleµ´³named³period´³atom³Double„„„„„„µ±delay´³rec´³lit³delay„´³tupleµ´³named³causingTurn´³refµ„³TurnId„„´³named³amount´³atom³Double„„„„„„µ±external´³rec´³lit³external„´³tupleµ´³named³description³any„„„„„„„³ TurnEvent´³orµµ±assert´³rec´³lit³assert„´³tupleµ´³named³ assertion´³refµ„³AssertionDescription„„´³named³handle´³refµ³protocol„³Handle„„„„„„µ±retract´³rec´³lit³retract„´³tupleµ´³named³handle´³refµ³protocol„³Handle„„„„„„µ±message´³rec´³lit³message„´³tupleµ´³named³body´³refµ„³AssertionDescription„„„„„„µ±sync´³rec´³lit³sync„´³tupleµ´³named³peer´³refµ„³Target„„„„„„µ± breakLink´³rec´³lit³
|
later-than„´³tupleµ´³named³seconds´³atom³Double„„„„„³ TimerKind´³orµµ±relative´³lit³relative„„µ±absolute´³lit³absolute„„µ±clear´³lit³clear„„„„³TimerExpired´³rec´³lit³
timer-expired„´³tupleµ´³named³label³any„´³named³seconds´³atom³Double„„„„„„³embeddedType€„„µ³trace„´³schema·³version°³definitions·³Oid³any³Name´³orµµ± anonymous´³rec´³lit³ anonymous„´³tupleµ„„„„µ±named´³rec´³lit³named„´³tupleµ´³named³name³any„„„„„„„³Target´³rec´³lit³entity„´³tupleµ´³named³actor´³refµ„³ActorId„„´³named³facet´³refµ„³FacetId„„´³named³oid´³refµ„³Oid„„„„„³TaskId³any³TurnId³any³ActorId³any³FacetId³any³ TurnCause´³orµµ±turn´³rec´³lit³ caused-by„´³tupleµ´³named³id´³refµ„³TurnId„„„„„„µ±cleanup´³rec´³lit³cleanup„´³tupleµ„„„„µ±linkedTaskRelease´³rec´³lit³linked-task-release„´³tupleµ´³named³id´³refµ„³TaskId„„´³named³reason´³refµ„³LinkedTaskReleaseReason„„„„„„µ±periodicActivation´³rec´³lit³periodic-activation„´³tupleµ´³named³period´³atom³Double„„„„„„µ±delay´³rec´³lit³delay„´³tupleµ´³named³causingTurn´³refµ„³TurnId„„´³named³amount´³atom³Double„„„„„„µ±external´³rec´³lit³external„´³tupleµ´³named³description³any„„„„„„„³ TurnEvent´³orµµ±assert´³rec´³lit³assert„´³tupleµ´³named³ assertion´³refµ„³AssertionDescription„„´³named³handle´³refµ³protocol„³Handle„„„„„„µ±retract´³rec´³lit³retract„´³tupleµ´³named³handle´³refµ³protocol„³Handle„„„„„„µ±message´³rec´³lit³message„´³tupleµ´³named³body´³refµ„³AssertionDescription„„„„„„µ±sync´³rec´³lit³sync„´³tupleµ´³named³peer´³refµ„³Target„„„„„„µ± breakLink´³rec´³lit³
|
||||||
break-link„´³tupleµ´³named³source´³refµ„³ActorId„„´³named³handle´³refµ³protocol„³Handle„„„„„„„„³
|
break-link„´³tupleµ´³named³source´³refµ„³ActorId„„´³named³handle´³refµ³protocol„³Handle„„„„„„„„³
|
||||||
ExitStatus´³orµµ±ok´³lit³ok„„µ±Error´³refµ³protocol„³Error„„„„³
|
ExitStatus´³orµµ±ok´³lit³ok„„µ±Error´³refµ³protocol„³Error„„„„³
|
||||||
|
@ -24,7 +24,7 @@ ByteString
|
||||||
ByteString„„´³named³oid³any„„´³named³caveats´³seqof´³refµ³sturdy„³Caveat„„„„„µ±general´³refµ³
|
ByteString„„´³named³oid³any„„´³named³caveats´³seqof´³refµ³sturdy„³Caveat„„„„„µ±general´³refµ³
|
||||||
gatekeeper„³Route„„„„³StandardTransport´³orµµ±wsUrl´³atom³String„„µ±other³any„„„„³embeddedType€„„µ³stream„´³schema·³version°³definitions·³Mode´³orµµ±bytes´³lit³bytes„„µ±lines´³refµ„³LineMode„„µ±packet´³rec´³lit³packet„´³tupleµ´³named³size´³atom³
SignedInteger„„„„„„µ±object´³rec´³lit³object„´³tupleµ´³named³description³any„„„„„„„³Sink´³orµµ±source´³rec´³lit³source„´³tupleµ´³named³
|
gatekeeper„³Route„„„„³StandardTransport´³orµµ±wsUrl´³atom³String„„µ±other³any„„„„³embeddedType€„„µ³stream„´³schema·³version°³definitions·³Mode´³orµµ±bytes´³lit³bytes„„µ±lines´³refµ„³LineMode„„µ±packet´³rec´³lit³packet„´³tupleµ´³named³size´³atom³
SignedInteger„„„„„„µ±object´³rec´³lit³object„´³tupleµ´³named³description³any„„„„„„„³Sink´³orµµ±source´³rec´³lit³source„´³tupleµ´³named³
|
||||||
controller´³embedded´³refµ„³Source„„„„„„„µ±StreamError´³refµ„³StreamError„„µ±data´³rec´³lit³data„´³tupleµ´³named³payload³any„´³named³mode´³refµ„³Mode„„„„„„µ±eof´³rec´³lit³eof„´³tupleµ„„„„„„³Source´³orµµ±sink´³rec´³lit³sink„´³tupleµ´³named³
|
controller´³embedded´³refµ„³Source„„„„„„„µ±StreamError´³refµ„³StreamError„„µ±data´³rec´³lit³data„´³tupleµ´³named³payload³any„´³named³mode´³refµ„³Mode„„„„„„µ±eof´³rec´³lit³eof„´³tupleµ„„„„„„³Source´³orµµ±sink´³rec´³lit³sink„´³tupleµ´³named³
|
||||||
controller´³embedded´³refµ„³Sink„„„„„„„µ±StreamError´³refµ„³StreamError„„µ±credit´³rec´³lit³credit„´³tupleµ´³named³amount´³refµ„³CreditAmount„„´³named³mode´³refµ„³Mode„„„„„„„„³LineMode´³orµµ±lf´³lit³lf„„µ±crlf´³lit³crlf„„„„³StreamError´³rec´³lit³error„´³tupleµ´³named³message´³atom³String„„„„„³CreditAmount´³orµµ±count´³atom³
SignedInteger„„µ± unbounded´³lit³ unbounded„„„„³StreamConnection´³rec´³lit³stream-connection„´³tupleµ´³named³source´³embedded´³refµ„³Source„„„´³named³sink´³embedded´³refµ„³Sink„„„´³named³spec³any„„„„³StreamListenerError´³rec´³lit³stream-listener-error„´³tupleµ´³named³spec³any„´³named³message´³atom³String„„„„„³StreamListenerReady´³rec´³lit³stream-listener-ready„´³tupleµ´³named³spec³any„„„„„³embeddedType´³refµ³ EntityRef„³Cap„„„µ³sturdy„´³schema·³version°³definitions·³Lit´³rec´³lit³lit„´³tupleµ´³named³value³any„„„„³Oid´³atom³
SignedInteger„³Alts´³rec´³lit³or„´³tupleµ´³named³alternatives´³seqof´³refµ„³Rewrite„„„„„„³PAnd´³rec´³lit³and„´³tupleµ´³named³patterns´³seqof´³refµ„³Pattern„„„„„„³PNot´³rec´³lit³not„´³tupleµ´³named³pattern´³refµ„³Pattern„„„„„³TRef´³rec´³lit³ref„´³tupleµ´³named³binding´³atom³
SignedInteger„„„„„³PAtom´³orµµ±Boolean´³lit³Boolean„„µ±Float´³lit³Float„„µ±Double´³lit³Double„„µ±
SignedInteger´³lit³
SignedInteger„„µ±String´³lit³String„„µ±
|
controller´³embedded´³refµ„³Sink„„„„„„„µ±StreamError´³refµ„³StreamError„„µ±credit´³rec´³lit³credit„´³tupleµ´³named³amount´³refµ„³CreditAmount„„´³named³mode´³refµ„³Mode„„„„„„„„³LineMode´³orµµ±lf´³lit³lf„„µ±crlf´³lit³crlf„„„„³StreamError´³rec´³lit³error„´³tupleµ´³named³message´³atom³String„„„„„³CreditAmount´³orµµ±count´³atom³
SignedInteger„„µ± unbounded´³lit³ unbounded„„„„³StreamConnection´³rec´³lit³stream-connection„´³tupleµ´³named³source´³embedded´³refµ„³Source„„„´³named³sink´³embedded´³refµ„³Sink„„„´³named³spec³any„„„„³StreamListenerError´³rec´³lit³stream-listener-error„´³tupleµ´³named³spec³any„´³named³message´³atom³String„„„„„³StreamListenerReady´³rec´³lit³stream-listener-ready„´³tupleµ´³named³spec³any„„„„„³embeddedType´³refµ³ EntityRef„³Cap„„„µ³sturdy„´³schema·³version°³definitions·³Lit´³rec´³lit³lit„´³tupleµ´³named³value³any„„„„³Oid´³atom³
SignedInteger„³Alts´³rec´³lit³or„´³tupleµ´³named³alternatives´³seqof´³refµ„³Rewrite„„„„„„³PAnd´³rec´³lit³and„´³tupleµ´³named³patterns´³seqof´³refµ„³Pattern„„„„„„³PNot´³rec´³lit³not„´³tupleµ´³named³pattern´³refµ„³Pattern„„„„„³TRef´³rec´³lit³ref„´³tupleµ´³named³binding´³atom³
SignedInteger„„„„„³PAtom´³orµµ±Boolean´³lit³Boolean„„µ±Double´³lit³Double„„µ±
SignedInteger´³lit³
SignedInteger„„µ±String´³lit³String„„µ±
|
||||||
ByteString´³lit³
|
ByteString´³lit³
|
||||||
ByteString„„µ±Symbol´³lit³Symbol„„„„³PBind´³rec´³lit³bind„´³tupleµ´³named³pattern´³refµ„³Pattern„„„„„³Caveat´³orµµ±Rewrite´³refµ„³Rewrite„„µ±Alts´³refµ„³Alts„„µ±Reject´³refµ„³Reject„„µ±unknown³any„„„³Reject´³rec´³lit³reject„´³tupleµ´³named³pattern´³refµ„³Pattern„„„„„³Pattern´³orµµ±PDiscard´³refµ„³PDiscard„„µ±PAtom´³refµ„³PAtom„„µ± PEmbedded´³refµ„³ PEmbedded„„µ±PBind´³refµ„³PBind„„µ±PAnd´³refµ„³PAnd„„µ±PNot´³refµ„³PNot„„µ±Lit´³refµ„³Lit„„µ± PCompound´³refµ„³ PCompound„„„„³Rewrite´³rec´³lit³rewrite„´³tupleµ´³named³pattern´³refµ„³Pattern„„´³named³template´³refµ„³Template„„„„„³WireRef´³orµµ±mine´³tupleµ´³lit° |