@alphaisyour/parser 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+
2
+ > @alphaisyour/parser@0.2.0 build C:\laragon\www\workspace-noalph\noalphjs\packages\noalph-parser
3
+ > tsc -p tsconfig.build.json
4
+
@@ -0,0 +1,14 @@
1
+
2
+ > @noalph/parser@0.1.0 test C:\laragon\www\workspace-noalph\noalphjs\packages\noalph-parser
3
+ > vitest run
4
+
5
+
6
+  RUN  v1.6.1 C:/laragon/www/workspace-noalph/noalphjs/packages/noalph-parser
7
+
8
+ ✓ src/parser.test.ts  (6 tests) 22ms
9
+
10
+  Test Files  1 passed (1)
11
+  Tests  6 passed (6)
12
+  Start at  17:04:28
13
+  Duration  2.02s (transform 656ms, setup 0ms, collect 928ms, tests 22ms, environment 0ms, prepare 621ms)
14
+
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # @alphaisyour/parser
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Release pertama noalphjs — fondasi framework JavaScript Indonesia dengan ekstensi .eno
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @alphaisyour/shared@0.2.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 noalphjs contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../noalph-shared/dist/types.d.ts","../../noalph-shared/dist/constants.d.ts","../../noalph-shared/dist/utils.d.ts","../../noalph-shared/dist/index.d.ts","../src/types.ts","../src/tokenizer.ts","../src/parser.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@20.19.43/node_modules/@types/node/index.d.ts"],"fileIdsList":[[73,116,119],[73,118,119],[119],[73,119,124,152],[73,119,120,125,130,138,149,160],[73,119,120,121,130,138],[73,119],[68,69,70,73,119],[73,119,122,161],[73,119,123,124,131,139],[73,119,124,149,157],[73,119,125,127,130,138],[73,118,119,126],[73,119,127,128],[73,119,129,130],[73,118,119,130],[73,119,130,131,132,149,160],[73,119,130,131,132,145,149,152],[73,119,127,130,133,138,149,160],[73,119,130,131,133,134,138,149,157,160],[73,119,133,135,149,157,160],[71,72,73,74,75,76,77,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166],[73,119,130,136],[73,119,137,160,165],[73,119,127,130,138,149],[73,119,139],[73,119,140],[73,118,119,141],[73,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166],[73,119,143],[73,119,144],[73,119,130,145,146],[73,119,145,147,161,163],[73,119,130,149,150,152],[73,119,151,152],[73,119,149,150],[73,119,152],[73,119,153],[73,116,119,149,154],[73,119,130,155,156],[73,119,155,156],[73,119,124,138,149,157],[73,119,158],[73,119,138,159],[73,119,133,144,160],[73,119,124,161],[73,119,149,162],[73,119,137,163],[73,119,164],[73,114,119],[73,114,119,130,132,141,149,152,160,163,165],[73,119,149,166],[73,86,90,119,160],[73,86,119,149,160],[73,81,119],[73,83,86,119,157,160],[73,119,138,157],[73,119,167],[73,81,119,167],[73,83,86,119,138,160],[73,78,79,82,85,119,130,149,160],[73,86,93,119],[73,78,84,119],[73,86,107,108,119],[73,82,86,119,152,160,167],[73,107,119,167],[73,80,81,119,167],[73,86,119],[73,80,81,82,83,84,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,108,109,110,111,112,113,119],[73,86,101,119],[73,86,93,94,119],[73,84,86,94,95,119],[73,85,119],[73,78,81,86,119],[73,86,90,94,95,119],[73,90,119],[73,84,86,89,119,160],[73,78,83,86,93,119],[73,119,149],[73,81,86,107,119,165,167],[64,65,66,73,119],[63,64,65,73,119],[64,73,119],[63,73,119],[60,61,62,73,119]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"5350430c202d5902388704d133df74e9e7452207917f5d1d630632695491efde","03ad6e05ca8a2acd7e164a34a51996dd4fe463dee2e7d35b682fbd1132af1c33","a39130742821b126095153d7352b347694aac29fe1185f44d15709621c8fce8a","0bc39d45b8477bffde3eba93d29a7175333068dc83d1245c7b6c7fe9ac65a76b",{"version":"af92e03b5d702d6ecacf2bac6d9563ab5e351f1aeaaf9649e42d2c1a4488f600","signature":"75a4902c9e0d5af69ba0c8d7993f2b52bb3cd83653db5d8342a6823fc8067187"},{"version":"ece62d0ccafaa55ed07ade74932abbfcfcb6f0a48fcf78c0bddd73a429ead667","signature":"c7ad5fc76bf32e3a81b2414a14c54c00621372b871ca1808b540a51de8f1d084"},{"version":"cd0f71c242ad4250bd29a1fa8c63f7c0018b7e48d31ef5518dc435a44b7aa380","signature":"b3c691bddd683e85e3d7ec5563071eb8dd76939d6413cb16054bd51d49e7779a"},{"version":"65bceaa8b389293cb6718cd7ea71f779f1a33b3f694dc047279eeb2a4655c329","signature":"ffd87bb413dcc4b46a223dab03d3b65c51bd550ee00d07169caf0cf31413f7d2"},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"ba481bca06f37d3f2c137ce343c7d5937029b2468f8e26111f3c9d9963d6568d","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d9ef24f9a22a88e3e9b3b3d8c40ab1ddb0853f1bfbd5c843c37800138437b61","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2677634fe27e87348825bb041651e22d50a613e2fdf6a4a3ade971d71bac37e","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"8c0bcd6c6b67b4b503c11e91a1fb91522ed585900eab2ab1f61bba7d7caa9d6f","impliedFormat":1},{"version":"8cd19276b6590b3ebbeeb030ac271871b9ed0afc3074ac88a94ed2449174b776","affectsGlobalScope":true,"impliedFormat":1},{"version":"696eb8d28f5949b87d894b26dc97318ef944c794a9a4e4f62360cd1d1958014b","impliedFormat":1},{"version":"3f8fa3061bd7402970b399300880d55257953ee6d3cd408722cb9ac20126460c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"68bd56c92c2bd7d2339457eb84d63e7de3bd56a69b25f3576e1568d21a162398","affectsGlobalScope":true,"impliedFormat":1},{"version":"3e93b123f7c2944969d291b35fed2af79a6e9e27fdd5faa99748a51c07c02d28","impliedFormat":1},{"version":"9d19808c8c291a9010a6c788e8532a2da70f811adb431c97520803e0ec649991","impliedFormat":1},{"version":"87aad3dd9752067dc875cfaa466fc44246451c0c560b820796bdd528e29bef40","impliedFormat":1},{"version":"4aacb0dd020eeaef65426153686cc639a78ec2885dc72ad220be1d25f1a439df","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"8db0ae9cb14d9955b14c214f34dae1b9ef2baee2fe4ce794a4cd3ac2531e3255","affectsGlobalScope":true,"impliedFormat":1},{"version":"15fc6f7512c86810273af28f224251a5a879e4261b4d4c7e532abfbfc3983134","impliedFormat":1},{"version":"58adba1a8ab2d10b54dc1dced4e41f4e7c9772cbbac40939c0dc8ce2cdb1d442","impliedFormat":1},{"version":"641942a78f9063caa5d6b777c99304b7d1dc7328076038c6d94d8a0b81fc95c1","impliedFormat":1},{"version":"1123a83f35cf56c97de746f0a7250012153c61a167e4a61668bf50e558162d14","impliedFormat":1},{"version":"855cd5f7eb396f5f1ab1bc0f8580339bff77b68a770f84c6b254e319bbfd1ac7","impliedFormat":1},{"version":"5650cf3dace09e7c25d384e3e6b818b938f68f4e8de96f52d9c5a1b3db068e86","impliedFormat":1},{"version":"1354ca5c38bd3fd3836a68e0f7c9f91f172582ba30ab15bb8c075891b91502b7","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e20d899c28ca26a2a7afc98beaa69e63ff7fba0a8bc47b4e3bf3ede5e09e424","impliedFormat":1},{"version":"2d2fcaab481b31a5882065c7951255703ddbe1c0e507af56ea42d79ac3911201","impliedFormat":1},{"version":"a192fe8ec33f75edbc8d8f3ed79f768dfae11ff5735e7fe52bfa69956e46d78d","impliedFormat":1},{"version":"ca867399f7db82df981d6915bcbb2d81131d7d1ef683bc782b59f71dda59bc85","affectsGlobalScope":true,"impliedFormat":1},{"version":"372413016d17d804e1d139418aca0c68e47a83fb6669490857f4b318de8cccb3","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"b4f70ec656a11d570e1a9edce07d118cd58d9760239e2ece99306ee9dfe61d02","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"6e70e9570e98aae2b825b533aa6292b6abd542e8d9f6e9475e88e1d7ba17c866","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"085f552d005479e2e6a7311cdbbe5d8c55c497b4d19274285df161ee9684cd9c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"007faacc9268357caa21d24169f3f3f2497af3e9241308df2d89f6e6d9bb3f2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"74cf591a0f63db318651e0e04cb55f8791385f86e987a67fd4d2eaab8191f730","impliedFormat":1},{"version":"5eab9b3dc9b34f185417342436ec3f106898da5f4801992d8ff38ab3aff346b5","impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"809821b8a065e3234a55b3a9d7846231ed18d66dd749f2494c66288d890daf7f","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"c3b41e74b9a84b88b1dca61ec39eee25c0dbc8e7d519ba11bb070918cfacf656","affectsGlobalScope":true,"impliedFormat":1},{"version":"4737a9dc24d0e68b734e6cfbcea0c15a2cfafeb493485e27905f7856988c6b29","affectsGlobalScope":true,"impliedFormat":1},{"version":"36d8d3e7506b631c9582c251a2c0b8a28855af3f76719b12b534c6edf952748d","impliedFormat":1},{"version":"1ca69210cc42729e7ca97d3a9ad48f2e9cb0042bada4075b588ae5387debd318","impliedFormat":1},{"version":"f5ebe66baaf7c552cfa59d75f2bfba679f329204847db3cec385acda245e574e","impliedFormat":1},{"version":"ed59add13139f84da271cafd32e2171876b0a0af2f798d0c663e8eeb867732cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7c5e2ea4a9749097c347454805e933844ed207b6eefec6b7cfd418b5f5f7b28","impliedFormat":1},{"version":"b1810689b76fd473bd12cc9ee219f8e62f54a7d08019a235d07424afbf074d25","impliedFormat":1}],"root":[[64,67]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[116,1],[117,1],[118,2],[73,3],[119,4],[120,5],[121,6],[68,7],[71,8],[69,7],[70,7],[122,9],[123,10],[124,11],[125,12],[126,13],[127,14],[128,14],[129,15],[130,16],[131,17],[132,18],[74,7],[72,7],[133,19],[134,20],[135,21],[167,22],[136,23],[137,24],[138,25],[139,26],[140,27],[141,28],[142,29],[143,30],[144,31],[145,32],[146,32],[147,33],[148,7],[149,34],[151,35],[150,36],[152,37],[153,38],[154,39],[155,40],[156,41],[157,42],[158,43],[159,44],[160,45],[161,46],[162,47],[163,48],[164,49],[75,7],[76,7],[77,7],[115,50],[165,51],[166,52],[58,7],[59,7],[10,7],[11,7],[13,7],[12,7],[2,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[20,7],[21,7],[3,7],[22,7],[23,7],[4,7],[24,7],[28,7],[25,7],[26,7],[27,7],[29,7],[30,7],[31,7],[5,7],[32,7],[33,7],[34,7],[35,7],[6,7],[39,7],[36,7],[37,7],[38,7],[40,7],[7,7],[41,7],[46,7],[47,7],[42,7],[43,7],[44,7],[45,7],[8,7],[51,7],[48,7],[49,7],[50,7],[52,7],[9,7],[53,7],[54,7],[55,7],[57,7],[56,7],[1,7],[93,53],[103,54],[92,53],[113,55],[84,56],[83,57],[112,58],[106,59],[111,60],[86,61],[100,62],[85,63],[109,64],[81,65],[80,58],[110,66],[82,67],[87,68],[88,7],[91,68],[78,7],[114,69],[104,70],[95,71],[96,72],[98,73],[94,74],[97,75],[107,58],[89,76],[90,77],[99,78],[79,79],[102,70],[101,68],[105,7],[108,80],[67,81],[66,82],[65,83],[64,84],[61,7],[63,85],[60,7],[62,7]],"latestChangedDtsFile":"./types.d.ts","version":"5.9.3"}
@@ -0,0 +1,4 @@
1
+ export { parse } from './parser';
2
+ export { tokenize } from './tokenizer';
3
+ export type { ParseResult, Token, TokenType } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { parse } from './parser';
2
+ export { tokenize } from './tokenizer';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { ParseResult } from './types';
2
+ export declare function parse(source: string): ParseResult;
3
+ //# sourceMappingURL=parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAuHjD"}
package/dist/parser.js ADDED
@@ -0,0 +1,110 @@
1
+ import { tokenize } from './tokenizer';
2
+ export function parse(source) {
3
+ const tokens = tokenize(source);
4
+ const errors = [];
5
+ const warnings = [];
6
+ const root = {
7
+ type: 'root',
8
+ start: 0,
9
+ end: source.length,
10
+ children: [],
11
+ };
12
+ // Simple recursive-descent parser — Phase 1 baseline
13
+ let cursor = 0;
14
+ function parseChildren() {
15
+ const children = [];
16
+ while (cursor < tokens.length && tokens[cursor]?.type !== 'EOF') {
17
+ const token = tokens[cursor];
18
+ if (!token)
19
+ break;
20
+ if (token.type === 'TagClose')
21
+ break;
22
+ if (token.type === 'Text') {
23
+ const trimmed = token.value.trim();
24
+ if (trimmed.length > 0) {
25
+ children.push({ type: 'text', start: token.start, end: token.end, value: token.value });
26
+ }
27
+ cursor++;
28
+ continue;
29
+ }
30
+ if (token.type === 'ExpressionStart') {
31
+ cursor++; // skip {
32
+ const expr = tokens[cursor];
33
+ const exprEnd = tokens[cursor + 1];
34
+ if (expr && exprEnd?.type === 'ExpressionEnd') {
35
+ children.push({ type: 'expression', start: token.start, end: exprEnd.end, value: expr.value.trim() });
36
+ cursor += 2;
37
+ }
38
+ continue;
39
+ }
40
+ if (token.type === 'ScriptBlock') {
41
+ const scriptContent = token.value.replace(/<script[^>]*>/, '').replace(/<\/script>/, '').trim();
42
+ children.push({ type: 'script', start: token.start, end: token.end, value: scriptContent });
43
+ cursor++;
44
+ continue;
45
+ }
46
+ if (token.type === 'StyleBlock') {
47
+ const styleContent = token.value.replace(/<style[^>]*>/, '').replace(/<\/style>/, '').trim();
48
+ children.push({ type: 'style', start: token.start, end: token.end, value: styleContent });
49
+ cursor++;
50
+ continue;
51
+ }
52
+ if (token.type === 'Comment') {
53
+ children.push({ type: 'comment', start: token.start, end: token.end, value: token.value });
54
+ cursor++;
55
+ continue;
56
+ }
57
+ if (token.type === 'TagOpen') {
58
+ const tagMatch = token.value.match(/^<([a-zA-Z][a-zA-Z0-9.-]*)/);
59
+ const tagName = tagMatch?.[1] ?? 'div';
60
+ const attrs = parseAttributes(token.value);
61
+ cursor++;
62
+ const nodeChildren = parseChildren();
63
+ if (tokens[cursor]?.type === 'TagClose')
64
+ cursor++;
65
+ children.push({
66
+ type: 'element',
67
+ start: token.start,
68
+ end: tokens[cursor - 1]?.end ?? token.end,
69
+ attributes: { tag: tagName, ...attrs },
70
+ children: nodeChildren,
71
+ });
72
+ continue;
73
+ }
74
+ if (token.type === 'TagSelfClose') {
75
+ const tagMatch = token.value.match(/^<([a-zA-Z][a-zA-Z0-9.-]*)/);
76
+ const tagName = tagMatch?.[1] ?? 'div';
77
+ const attrs = parseAttributes(token.value);
78
+ children.push({
79
+ type: 'element',
80
+ start: token.start,
81
+ end: token.end,
82
+ attributes: { tag: tagName, ...attrs, selfClose: true },
83
+ children: [],
84
+ });
85
+ cursor++;
86
+ continue;
87
+ }
88
+ cursor++;
89
+ }
90
+ return children;
91
+ }
92
+ function parseAttributes(tagString) {
93
+ const attrs = {};
94
+ const attrRegex = /([a-zA-Z:@][a-zA-Z0-9:.-]*)(?:="([^"]*)")?/g;
95
+ let match;
96
+ const cleanTag = tagString.replace(/^<[a-zA-Z][a-zA-Z0-9.-]*/, '').replace(/\/?>$/, '');
97
+ while ((match = attrRegex.exec(cleanTag)) !== null) {
98
+ const key = match[1];
99
+ if (key)
100
+ attrs[key] = match[2] ?? true;
101
+ }
102
+ return attrs;
103
+ }
104
+ root.children = parseChildren();
105
+ if (errors.length > 0) {
106
+ warnings.push({ message: `${errors.length} error ditemukan saat parsing`, line: 0, column: 0 });
107
+ }
108
+ return { ast: root, errors, warnings };
109
+ }
110
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGtC,MAAM,UAAU,KAAK,CAAC,MAAc;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC/B,MAAM,MAAM,GAA0B,EAAE,CAAA;IACxC,MAAM,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MAAM,EAAE,QAAQ,EAAE,CAAA;AACxC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Token } from './types';
2
+ export declare function tokenize(source: string): Token[];
3
+ //# sourceMappingURL=tokenizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../src/tokenizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,SAAS,CAAA;AAE/C,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,CAuGhD"}
@@ -0,0 +1,109 @@
1
+ export function tokenize(source) {
2
+ const tokens = [];
3
+ let pos = 0;
4
+ let line = 1;
5
+ let column = 1;
6
+ const advance = (count = 1) => {
7
+ for (let i = 0; i < count; i++) {
8
+ if (source[pos] === '\n') {
9
+ line++;
10
+ column = 1;
11
+ }
12
+ else {
13
+ column++;
14
+ }
15
+ pos++;
16
+ }
17
+ };
18
+ const peek = (offset = 0) => source[pos + offset] ?? '';
19
+ const remaining = () => source.slice(pos);
20
+ while (pos < source.length) {
21
+ const startPos = pos;
22
+ const startLine = line;
23
+ const startColumn = column;
24
+ const addToken = (type, value) => {
25
+ tokens.push({ type, value, start: startPos, end: pos, line: startLine, column: startColumn });
26
+ };
27
+ // Script block: <script>...</script>
28
+ if (remaining().startsWith('<script>') || remaining().startsWith('<script ')) {
29
+ const end = source.indexOf('</script>', pos);
30
+ if (end === -1) {
31
+ advance(remaining().length);
32
+ break;
33
+ }
34
+ const value = source.slice(pos, end + 9);
35
+ advance(value.length);
36
+ addToken('ScriptBlock', value);
37
+ continue;
38
+ }
39
+ // Style block: <style>...</style>
40
+ if (remaining().startsWith('<style>') || remaining().startsWith('<style ')) {
41
+ const end = source.indexOf('</style>', pos);
42
+ if (end === -1) {
43
+ advance(remaining().length);
44
+ break;
45
+ }
46
+ const value = source.slice(pos, end + 8);
47
+ advance(value.length);
48
+ addToken('StyleBlock', value);
49
+ continue;
50
+ }
51
+ // Comment: <!-- ... -->
52
+ if (remaining().startsWith('<!--')) {
53
+ const end = source.indexOf('-->', pos + 4);
54
+ const value = end === -1 ? remaining() : source.slice(pos, end + 3);
55
+ advance(value.length);
56
+ addToken('Comment', value);
57
+ continue;
58
+ }
59
+ // Expression: { ... }
60
+ if (peek() === '{') {
61
+ advance();
62
+ addToken('ExpressionStart', '{');
63
+ const end = source.indexOf('}', pos);
64
+ if (end !== -1) {
65
+ const expr = source.slice(pos, end);
66
+ advance(expr.length);
67
+ addToken('Text', expr);
68
+ advance();
69
+ addToken('ExpressionEnd', '}');
70
+ }
71
+ continue;
72
+ }
73
+ // Tags
74
+ if (peek() === '<') {
75
+ if (peek(1) === '/') {
76
+ // Closing tag
77
+ const end = source.indexOf('>', pos);
78
+ const value = end === -1 ? remaining() : source.slice(pos, end + 1);
79
+ advance(value.length);
80
+ addToken('TagClose', value);
81
+ continue;
82
+ }
83
+ const end = source.indexOf('>', pos);
84
+ const value = end === -1 ? remaining() : source.slice(pos, end + 1);
85
+ advance(value.length);
86
+ addToken(value.endsWith('/>') ? 'TagSelfClose' : 'TagOpen', value);
87
+ continue;
88
+ }
89
+ // Text
90
+ const nextTag = source.indexOf('<', pos);
91
+ const nextExpr = source.indexOf('{', pos);
92
+ let textEnd = source.length;
93
+ if (nextTag !== -1 && nextTag < textEnd)
94
+ textEnd = nextTag;
95
+ if (nextExpr !== -1 && nextExpr < textEnd)
96
+ textEnd = nextExpr;
97
+ const text = source.slice(pos, textEnd);
98
+ if (text.length > 0) {
99
+ advance(text.length);
100
+ addToken('Text', text);
101
+ }
102
+ else {
103
+ advance();
104
+ }
105
+ }
106
+ tokens.push({ type: 'EOF', value: '', start: pos, end: pos, line, column });
107
+ return tokens;
108
+ }
109
+ //# sourceMappingURL=tokenizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenizer.js","sourceRoot":"","sources":["../src/tokenizer.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ,C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,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;IAC3E,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { EnoNode } from '@alphaisyour/shared';
2
+ export interface ParseResult {
3
+ ast: EnoNode;
4
+ errors: ParseError[];
5
+ warnings: ParseWarning[];
6
+ }
7
+ export interface ParseError {
8
+ message: string;
9
+ line: number;
10
+ column: number;
11
+ source?: string;
12
+ }
13
+ export interface ParseWarning {
14
+ message: string;
15
+ line: number;
16
+ column: number;
17
+ }
18
+ export type TokenType = 'TagOpen' | 'TagClose' | 'TagSelfClose' | 'Attribute' | 'Text' | 'ExpressionStart' | 'ExpressionEnd' | 'DirectiveStart' | 'ScriptBlock' | 'StyleBlock' | 'Comment' | 'EOF';
19
+ export interface Token {
20
+ type: TokenType;
21
+ value: string;
22
+ start: number;
23
+ end: number;
24
+ line: number;
25
+ column: number;
26
+ }
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,OAAO,CAAA;IACZ,MAAM,EAAE,UAAU,EAAE,CAAA;IACpB,QAAQ,EAAE,YAAY,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,UAAU,GACV,cAAc,GACd,WAAW,GACX,MAAM,GACN,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,SAAS,GACT,KAAK,CAAA;AAET,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@alphaisyour/parser",
3
+ "version": "0.2.0",
4
+ "description": "Parser file .eno menjadi AST untuk ekosistem noalphjs",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs",
13
+ "types": "./dist/index.d.ts"
14
+ }
15
+ },
16
+ "dependencies": {
17
+ "@alphaisyour/shared": "0.2.0"
18
+ },
19
+ "devDependencies": {
20
+ "typescript": "*",
21
+ "vitest": "*"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc -p tsconfig.build.json",
25
+ "dev": "tsc -p tsconfig.build.json --watch",
26
+ "test": "vitest run",
27
+ "typecheck": "tsc --noEmit",
28
+ "clean": "rm -rf dist *.tsbuildinfo"
29
+ }
30
+ }
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { parse } from './parser'
2
+ export { tokenize } from './tokenizer'
3
+ export type { ParseResult, Token, TokenType } from './types'
@@ -0,0 +1,45 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { parse } from './parser'
3
+
4
+ describe('parse', () => {
5
+ it('mem-parse elemen sederhana', () => {
6
+ const result = parse('<div>Halo</div>')
7
+ expect(result.errors).toHaveLength(0)
8
+ expect(result.ast.type).toBe('root')
9
+ expect(result.ast.children).toBeDefined()
10
+ expect(result.ast.children!.length).toBeGreaterThan(0)
11
+ })
12
+
13
+ it('mem-parse ekspresi { variabel }', () => {
14
+ const result = parse('<p>{nama}</p>')
15
+ expect(result.errors).toHaveLength(0)
16
+ const p = result.ast.children?.find(n => n.type === 'element')
17
+ expect(p).toBeDefined()
18
+ })
19
+
20
+ it('mem-parse script block', () => {
21
+ const result = parse('<script>\nlet x = 1\n</script>\n<div>{x}</div>')
22
+ const script = result.ast.children?.find(n => n.type === 'script')
23
+ expect(script).toBeDefined()
24
+ expect(String(script!.value)).toContain('let x = 1')
25
+ })
26
+
27
+ it('mem-parse style block', () => {
28
+ const result = parse('<style>\n.app { color: red; }\n</style>\n<div/>')
29
+ const style = result.ast.children?.find(n => n.type === 'style')
30
+ expect(style).toBeDefined()
31
+ expect(String(style!.value)).toContain('.app')
32
+ })
33
+
34
+ it('mem-parse komentar HTML', () => {
35
+ const result = parse('<!-- ini komentar --><div/>')
36
+ const comment = result.ast.children?.find(n => n.type === 'comment')
37
+ expect(comment).toBeDefined()
38
+ })
39
+
40
+ it('mengembalikan AST dengan root yang valid untuk input kosong', () => {
41
+ const result = parse('')
42
+ expect(result.ast.type).toBe('root')
43
+ expect(result.errors).toHaveLength(0)
44
+ })
45
+ })
package/src/parser.ts ADDED
@@ -0,0 +1,124 @@
1
+ import type { EnoNode } from '@alphaisyour/shared'
2
+ import { tokenize } from './tokenizer'
3
+ import type { ParseResult } from './types'
4
+
5
+ export function parse(source: string): ParseResult {
6
+ const tokens = tokenize(source)
7
+ const errors: ParseResult['errors'] = []
8
+ const warnings: ParseResult['warnings'] = []
9
+
10
+ const root: EnoNode = {
11
+ type: 'root',
12
+ start: 0,
13
+ end: source.length,
14
+ children: [],
15
+ }
16
+
17
+ // Simple recursive-descent parser — Phase 1 baseline
18
+ let cursor = 0
19
+
20
+ function parseChildren(): EnoNode[] {
21
+ const children: EnoNode[] = []
22
+ while (cursor < tokens.length && tokens[cursor]?.type !== 'EOF') {
23
+ const token = tokens[cursor]
24
+ if (!token) break
25
+
26
+ if (token.type === 'TagClose') break
27
+
28
+ if (token.type === 'Text') {
29
+ const trimmed = token.value.trim()
30
+ if (trimmed.length > 0) {
31
+ children.push({ type: 'text', start: token.start, end: token.end, value: token.value })
32
+ }
33
+ cursor++
34
+ continue
35
+ }
36
+
37
+ if (token.type === 'ExpressionStart') {
38
+ cursor++ // skip {
39
+ const expr = tokens[cursor]
40
+ const exprEnd = tokens[cursor + 1]
41
+ if (expr && exprEnd?.type === 'ExpressionEnd') {
42
+ children.push({ type: 'expression', start: token.start, end: exprEnd.end, value: expr.value.trim() })
43
+ cursor += 2
44
+ }
45
+ continue
46
+ }
47
+
48
+ if (token.type === 'ScriptBlock') {
49
+ const scriptContent = token.value.replace(/<script[^>]*>/, '').replace(/<\/script>/, '').trim()
50
+ children.push({ type: 'script', start: token.start, end: token.end, value: scriptContent })
51
+ cursor++
52
+ continue
53
+ }
54
+
55
+ if (token.type === 'StyleBlock') {
56
+ const styleContent = token.value.replace(/<style[^>]*>/, '').replace(/<\/style>/, '').trim()
57
+ children.push({ type: 'style', start: token.start, end: token.end, value: styleContent })
58
+ cursor++
59
+ continue
60
+ }
61
+
62
+ if (token.type === 'Comment') {
63
+ children.push({ type: 'comment', start: token.start, end: token.end, value: token.value })
64
+ cursor++
65
+ continue
66
+ }
67
+
68
+ if (token.type === 'TagOpen') {
69
+ const tagMatch = token.value.match(/^<([a-zA-Z][a-zA-Z0-9.-]*)/)
70
+ const tagName = tagMatch?.[1] ?? 'div'
71
+ const attrs = parseAttributes(token.value)
72
+ cursor++
73
+ const nodeChildren = parseChildren()
74
+ if (tokens[cursor]?.type === 'TagClose') cursor++
75
+ children.push({
76
+ type: 'element',
77
+ start: token.start,
78
+ end: tokens[cursor - 1]?.end ?? token.end,
79
+ attributes: { tag: tagName, ...attrs },
80
+ children: nodeChildren,
81
+ })
82
+ continue
83
+ }
84
+
85
+ if (token.type === 'TagSelfClose') {
86
+ const tagMatch = token.value.match(/^<([a-zA-Z][a-zA-Z0-9.-]*)/)
87
+ const tagName = tagMatch?.[1] ?? 'div'
88
+ const attrs = parseAttributes(token.value)
89
+ children.push({
90
+ type: 'element',
91
+ start: token.start,
92
+ end: token.end,
93
+ attributes: { tag: tagName, ...attrs, selfClose: true },
94
+ children: [],
95
+ })
96
+ cursor++
97
+ continue
98
+ }
99
+
100
+ cursor++
101
+ }
102
+ return children
103
+ }
104
+
105
+ function parseAttributes(tagString: string): Record<string, unknown> {
106
+ const attrs: Record<string, unknown> = {}
107
+ const attrRegex = /([a-zA-Z:@][a-zA-Z0-9:.-]*)(?:="([^"]*)")?/g
108
+ let match: RegExpExecArray | null
109
+ const cleanTag = tagString.replace(/^<[a-zA-Z][a-zA-Z0-9.-]*/, '').replace(/\/?>$/, '')
110
+ while ((match = attrRegex.exec(cleanTag)) !== null) {
111
+ const key = match[1]
112
+ if (key) attrs[key] = match[2] ?? true
113
+ }
114
+ return attrs
115
+ }
116
+
117
+ root.children = parseChildren()
118
+
119
+ if (errors.length > 0) {
120
+ warnings.push({ message: `${errors.length} error ditemukan saat parsing`, line: 0, column: 0 })
121
+ }
122
+
123
+ return { ast: root, errors, warnings }
124
+ }
@@ -0,0 +1,106 @@
1
+ import type { Token, TokenType } from './types'
2
+
3
+ export function tokenize(source: string): Token[] {
4
+ const tokens: Token[] = []
5
+ let pos = 0
6
+ let line = 1
7
+ let column = 1
8
+
9
+ const advance = (count = 1) => {
10
+ for (let i = 0; i < count; i++) {
11
+ if (source[pos] === '\n') { line++; column = 1 } else { column++ }
12
+ pos++
13
+ }
14
+ }
15
+
16
+ const peek = (offset = 0) => source[pos + offset] ?? ''
17
+ const remaining = () => source.slice(pos)
18
+
19
+ while (pos < source.length) {
20
+ const startPos = pos
21
+ const startLine = line
22
+ const startColumn = column
23
+
24
+ const addToken = (type: TokenType, value: string) => {
25
+ tokens.push({ type, value, start: startPos, end: pos, line: startLine, column: startColumn })
26
+ }
27
+
28
+ // Script block: <script>...</script>
29
+ if (remaining().startsWith('<script>') || remaining().startsWith('<script ')) {
30
+ const end = source.indexOf('</script>', pos)
31
+ if (end === -1) { advance(remaining().length); break }
32
+ const value = source.slice(pos, end + 9)
33
+ advance(value.length)
34
+ addToken('ScriptBlock', value)
35
+ continue
36
+ }
37
+
38
+ // Style block: <style>...</style>
39
+ if (remaining().startsWith('<style>') || remaining().startsWith('<style ')) {
40
+ const end = source.indexOf('</style>', pos)
41
+ if (end === -1) { advance(remaining().length); break }
42
+ const value = source.slice(pos, end + 8)
43
+ advance(value.length)
44
+ addToken('StyleBlock', value)
45
+ continue
46
+ }
47
+
48
+ // Comment: <!-- ... -->
49
+ if (remaining().startsWith('<!--')) {
50
+ const end = source.indexOf('-->', pos + 4)
51
+ const value = end === -1 ? remaining() : source.slice(pos, end + 3)
52
+ advance(value.length)
53
+ addToken('Comment', value)
54
+ continue
55
+ }
56
+
57
+ // Expression: { ... }
58
+ if (peek() === '{') {
59
+ advance()
60
+ addToken('ExpressionStart', '{')
61
+ const end = source.indexOf('}', pos)
62
+ if (end !== -1) {
63
+ const expr = source.slice(pos, end)
64
+ advance(expr.length)
65
+ addToken('Text', expr)
66
+ advance()
67
+ addToken('ExpressionEnd', '}')
68
+ }
69
+ continue
70
+ }
71
+
72
+ // Tags
73
+ if (peek() === '<') {
74
+ if (peek(1) === '/') {
75
+ // Closing tag
76
+ const end = source.indexOf('>', pos)
77
+ const value = end === -1 ? remaining() : source.slice(pos, end + 1)
78
+ advance(value.length)
79
+ addToken('TagClose', value)
80
+ continue
81
+ }
82
+ const end = source.indexOf('>', pos)
83
+ const value = end === -1 ? remaining() : source.slice(pos, end + 1)
84
+ advance(value.length)
85
+ addToken(value.endsWith('/>') ? 'TagSelfClose' : 'TagOpen', value)
86
+ continue
87
+ }
88
+
89
+ // Text
90
+ const nextTag = source.indexOf('<', pos)
91
+ const nextExpr = source.indexOf('{', pos)
92
+ let textEnd = source.length
93
+ if (nextTag !== -1 && nextTag < textEnd) textEnd = nextTag
94
+ if (nextExpr !== -1 && nextExpr < textEnd) textEnd = nextExpr
95
+ const text = source.slice(pos, textEnd)
96
+ if (text.length > 0) {
97
+ advance(text.length)
98
+ addToken('Text', text)
99
+ } else {
100
+ advance()
101
+ }
102
+ }
103
+
104
+ tokens.push({ type: 'EOF', value: '', start: pos, end: pos, line, column })
105
+ return tokens
106
+ }
package/src/types.ts ADDED
@@ -0,0 +1,43 @@
1
+ import type { EnoNode } from '@alphaisyour/shared'
2
+
3
+ export interface ParseResult {
4
+ ast: EnoNode
5
+ errors: ParseError[]
6
+ warnings: ParseWarning[]
7
+ }
8
+
9
+ export interface ParseError {
10
+ message: string
11
+ line: number
12
+ column: number
13
+ source?: string
14
+ }
15
+
16
+ export interface ParseWarning {
17
+ message: string
18
+ line: number
19
+ column: number
20
+ }
21
+
22
+ export type TokenType =
23
+ | 'TagOpen'
24
+ | 'TagClose'
25
+ | 'TagSelfClose'
26
+ | 'Attribute'
27
+ | 'Text'
28
+ | 'ExpressionStart'
29
+ | 'ExpressionEnd'
30
+ | 'DirectiveStart'
31
+ | 'ScriptBlock'
32
+ | 'StyleBlock'
33
+ | 'Comment'
34
+ | 'EOF'
35
+
36
+ export interface Token {
37
+ type: TokenType
38
+ value: string
39
+ start: number
40
+ end: number
41
+ line: number
42
+ column: number
43
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["**/*.test.ts", "**/*.spec.ts", "**/__tests__/**"]
4
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": "./src",
6
+ "tsBuildInfoFile": "./dist/.tsbuildinfo"
7
+ },
8
+ "include": ["src"],
9
+ "references": []
10
+ }
@@ -0,0 +1,14 @@
1
+ import { defineConfig } from 'vitest/config'
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ environment: 'node',
7
+ passWithNoTests: true,
8
+ coverage: {
9
+ provider: 'v8',
10
+ reporter: ['text', 'json', 'html'],
11
+ exclude: ['**/node_modules/**', '**/dist/**', '**/*.config.*'],
12
+ },
13
+ },
14
+ })