@tempots/beatui 0.30.2 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{2019-Cd9nHhvg.js → 2019-BAbSTPyW.js} +9 -10
- package/dist/2019-BMZkvreo.cjs +1 -0
- package/dist/{2020-CyKJpuK6.js → 2020-BQNEk3m-.js} +30 -31
- package/dist/2020-COaJ7nGc.cjs +1 -0
- package/dist/ar-CqAHPRKu.cjs +1 -0
- package/dist/{ar-Dz8Mg5la.js → ar-avevuYiW.js} +30 -15
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +85 -84
- package/dist/beatui.css +218 -11
- package/dist/beatui.tailwind.css +218 -11
- package/dist/de--4OtRESW.cjs +1 -0
- package/dist/{de-ToWTQGEo.js → de-Cz7ah611.js} +27 -12
- package/dist/es-CE1wRgxl.cjs +1 -0
- package/dist/{es-CruxS0Tz.js → es-CiNQQzF1.js} +27 -12
- package/dist/fa-DjuJZNLK.cjs +1 -0
- package/dist/{fa-Cf0NZLWA.js → fa-Gkt0b9XN.js} +30 -15
- package/dist/fr-DotyzMGL.cjs +1 -0
- package/dist/{fr-YKXmqMGr.js → fr-xM9p9Q6G.js} +20 -5
- package/dist/he-BQ6ygVEQ.cjs +1 -0
- package/dist/{he-D8ZOduPw.js → he-CoO6PsiS.js} +30 -15
- package/dist/hi-BCfJ0mRh.cjs +1 -0
- package/dist/{hi-CIamzVEf.js → hi-DA3-4Cdo.js} +30 -15
- package/dist/index-1_pssujS.cjs +8 -0
- package/dist/index-B4irUWVb.cjs +34 -0
- package/dist/index-BI5w0jSz.js +2707 -0
- package/dist/index-Bv2gn_kV.cjs +4 -0
- package/dist/index-CDOHHPwQ.js +14275 -0
- package/dist/{index-O9BwR_8P.cjs → index-CFh4D56e.cjs} +1 -1
- package/dist/index-CKyH3jwP.cjs +1 -0
- package/dist/index-Caetcp0r.js +68 -0
- package/dist/{index-DDpjzV7E.js → index-DfmwsIle.js} +304 -307
- package/dist/{index-B2079wM-.js → index-DjShJtXp.js} +15 -15
- package/dist/index-DqeaEUPG.cjs +1 -0
- package/dist/{index-DFJed4ks.js → index-E76KKV9V.js} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +1667 -1695
- package/dist/{it-Bn7tG_KC.js → it-EdPuWBJR.js} +29 -14
- package/dist/it-pv2Gm3jb.cjs +1 -0
- package/dist/{ja-i1ULXeiu.js → ja-BSRCR430.js} +25 -10
- package/dist/ja-CuRaPMgh.cjs +1 -0
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/ko-C7YP1PL4.cjs +1 -0
- package/dist/{ko-BpKDmtvY.js → ko-Dm4oD1fh.js} +30 -15
- package/dist/markdown/index.cjs.js +1 -2
- package/dist/markdown/index.es.js +4 -420
- package/dist/modal-CepbiM3u.cjs +1 -0
- package/dist/{modal-DvGSDVSv.js → modal-eY-3j_zS.js} +14 -13
- package/dist/monaco/index.cjs.js +1 -1
- package/dist/monaco/index.es.js +1 -1
- package/dist/{nl-Cs4PDWCJ.js → nl-B0l1kdfd.js} +31 -16
- package/dist/nl-ClCD6lP-.cjs +1 -0
- package/dist/notice-Ct8ZHvwq.js +1467 -0
- package/dist/notice-cpODDUvJ.cjs +2 -0
- package/dist/{pl-BFLNf991.js → pl-DVKneBSY.js} +31 -16
- package/dist/pl-fyCkqVrr.cjs +1 -0
- package/dist/prosemirror/index.cjs.js +1 -0
- package/dist/prosemirror/index.es.js +6 -0
- package/dist/prosemirror.css +294 -0
- package/dist/pt-BHExG3lf.cjs +1 -0
- package/dist/{pt-BRZeOkcE.js → pt-Bw0sTDOX.js} +31 -16
- package/dist/{ru-KI7Gowz-.js → ru-B26VQ4f9.js} +35 -20
- package/dist/ru-PuEOLDw1.cjs +1 -0
- package/dist/styles-url-CF_019NX.js +4 -0
- package/dist/styles-url-DhmSan6u.cjs +1 -0
- package/dist/theme-B7C5kIJj.cjs +1 -0
- package/dist/theme-DsQOxXW1.js +34 -0
- package/dist/toolbar-ClJbaKID.js +118 -0
- package/dist/toolbar-kwkvH3nX.cjs +1 -0
- package/dist/tr-CI97fTpD.cjs +1 -0
- package/dist/{tr-CYk8Fua5.js → tr-DQMivdvy.js} +28 -13
- package/dist/{translations-DdNHXAWr.js → translations-1yD6Rm5l.js} +1 -1
- package/dist/translations-DQxg-W9w.cjs +1 -0
- package/dist/translations-ZB5oDFId.cjs +1 -0
- package/dist/translations-iam7PITs.js +831 -0
- package/dist/types/beatui-i18n/default.d.ts +14 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +14 -0
- package/dist/types/beatui-i18n/translations.d.ts +14 -0
- package/dist/types/components/beatui.d.ts +4 -1
- package/dist/types/components/form/input/input-container.d.ts +3 -1
- package/dist/types/components/form/input/input-options.d.ts +6 -0
- package/dist/types/components/navigation/tabs/tabs.d.ts +6 -1
- package/dist/types/components/overlay/index.d.ts +1 -0
- package/dist/types/components/overlay/ribbon.d.ts +22 -0
- package/dist/types/components/prosemirror/etoolbar-button.d.ts +11 -0
- package/dist/types/components/prosemirror/etoolbar-group.d.ts +4 -0
- package/dist/types/components/prosemirror/link-control.d.ts +12 -0
- package/dist/types/components/prosemirror/prosemirror-markdown-input.d.ts +76 -0
- package/dist/types/components/prosemirror/prosemirror-toolbar.d.ts +18 -0
- package/dist/types/components/prosemirror/utils.d.ts +12 -0
- package/dist/types/components/theme/theme.d.ts +5 -2
- package/dist/types/prosemirror/index.d.ts +2 -0
- package/dist/ur-B3CiO8KH.cjs +1 -0
- package/dist/{ur-BIcZGLWt.js → ur-o3rog5MJ.js} +30 -15
- package/dist/utils-CCAYvnZh.cjs +1 -0
- package/dist/{utils-D1op9R8_.js → utils-CuD-_CDx.js} +74 -73
- package/dist/{vi-BeK62QeB.js → vi-C7cb2K_B.js} +19 -4
- package/dist/vi-FibsLfdk.cjs +1 -0
- package/dist/zh-BtSj_Euh.cjs +1 -0
- package/dist/{zh-Dt6yWDu2.js → zh-NGrfqAHM.js} +32 -17
- package/package.json +20 -13
- package/dist/2019-Bl1mhxeM.cjs +0 -1
- package/dist/2020-BKqFJLj6.cjs +0 -1
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +0 -1
- package/dist/apl-B2DGVGxc.js +0 -76
- package/dist/apl-M-DNMvvR.cjs +0 -1
- package/dist/ar-CbsALGhG.cjs +0 -1
- package/dist/asciiarmor-2LVJmxlE.js +0 -34
- package/dist/asciiarmor-BMx3XVjX.cjs +0 -1
- package/dist/asn1-OOsVM4yU.cjs +0 -1
- package/dist/asn1-jKiBa2Ya.js +0 -95
- package/dist/asterisk-B1QUaW1C.cjs +0 -1
- package/dist/asterisk-DS281yxp.js +0 -271
- package/dist/brainfuck-BjUlYKdF.cjs +0 -1
- package/dist/brainfuck-C_p9pTT8.js +0 -34
- package/dist/clike-BEMIzMUI.cjs +0 -1
- package/dist/clike-DGTaUp48.js +0 -620
- package/dist/clojure-Ap_IXD2I.cjs +0 -1
- package/dist/clojure-CCKyeQKf.js +0 -800
- package/dist/cmake-C4D5_VmS.cjs +0 -1
- package/dist/cmake-CuaCgAKt.js +0 -28
- package/dist/cobol-BlTKFDRj.js +0 -72
- package/dist/cobol-Du-cT2hr.cjs +0 -1
- package/dist/coffeescript-BVCvwO8I.js +0 -179
- package/dist/coffeescript-DDFAj2ea.cjs +0 -1
- package/dist/commonlisp-CXBBRCTx.cjs +0 -1
- package/dist/commonlisp-D_kxz07b.js +0 -75
- package/dist/crystal-D309uH6_.js +0 -217
- package/dist/crystal-DAFWRDbh.cjs +0 -1
- package/dist/css-BkF-NPzE.js +0 -1553
- package/dist/css-DzFJyRJ8.cjs +0 -1
- package/dist/cypher-BMq4Fwjl.js +0 -68
- package/dist/cypher-BN0-oCze.cjs +0 -1
- package/dist/d-BHsqGcfm.cjs +0 -1
- package/dist/d-BZcgY6La.js +0 -127
- package/dist/de-MO-u5hoD.cjs +0 -1
- package/dist/diff-CemTHKfk.cjs +0 -1
- package/dist/diff-Cg9d_RX2.js +0 -18
- package/dist/dockerfile-BBTH3voH.cjs +0 -1
- package/dist/dockerfile-DIy8NleC.js +0 -194
- package/dist/dtd-ChoVQPwv.cjs +0 -1
- package/dist/dtd-CtLokQ-U.js +0 -84
- package/dist/dylan-QYeExnWK.js +0 -234
- package/dist/dylan-apTQIgUA.cjs +0 -1
- package/dist/ebnf-DUPDuY4r.js +0 -78
- package/dist/ebnf-LYmLy17h.cjs +0 -1
- package/dist/ecl-C7WNQq7-.cjs +0 -1
- package/dist/ecl-CiXN-g_D.js +0 -121
- package/dist/eiffel-BJThA8RG.cjs +0 -1
- package/dist/eiffel-yQhjl4T1.js +0 -110
- package/dist/elm-CNT9vbN0.js +0 -108
- package/dist/elm-CcXP9T36.cjs +0 -1
- package/dist/erlang-B6mpcObI.cjs +0 -1
- package/dist/erlang-CFOYdy9e.js +0 -487
- package/dist/es-CqkWVfis.cjs +0 -1
- package/dist/fa-DR8j7v-l.cjs +0 -1
- package/dist/factor-B-tsx9yW.cjs +0 -1
- package/dist/factor-DDOC7X6P.js +0 -65
- package/dist/fcl-BzAKklXo.cjs +0 -1
- package/dist/fcl-CPC2WYrI.js +0 -103
- package/dist/forth-BmxRyE9S.js +0 -60
- package/dist/forth-CPAzyZ_n.cjs +0 -1
- package/dist/fortran-9bvPyrOW.js +0 -442
- package/dist/fortran-DHiTlGV1.cjs +0 -1
- package/dist/fr-ClK0mWTO.cjs +0 -1
- package/dist/gas-BiPtGF2E.cjs +0 -1
- package/dist/gas-cpmYfFX2.js +0 -183
- package/dist/gherkin-CJuwpceU.js +0 -34
- package/dist/gherkin-Djo7Y51D.cjs +0 -1
- package/dist/groovy-BMVITiCm.cjs +0 -1
- package/dist/groovy-DZeT_VM-.js +0 -146
- package/dist/haskell-Bvt3Qq1t.js +0 -375
- package/dist/haskell-CngODaW-.cjs +0 -1
- package/dist/haxe-70NVW1pR.js +0 -359
- package/dist/haxe-Dyk-piTh.cjs +0 -1
- package/dist/he-DeJMBRTP.cjs +0 -1
- package/dist/hi-C9Anq8Ae.cjs +0 -1
- package/dist/http-BkLifcnL.cjs +0 -1
- package/dist/http-D9LttvKF.js +0 -44
- package/dist/idl-B6TRFYjl.js +0 -947
- package/dist/idl-FmHDmsE-.cjs +0 -1
- package/dist/index-0dpJGQbC.js +0 -94
- package/dist/index-52kzSRNb.cjs +0 -1
- package/dist/index-5a6_6F3Z.cjs +0 -6
- package/dist/index-BGHGZg_7.js +0 -552
- package/dist/index-BMn-7Ble.js +0 -1307
- package/dist/index-BR0F2BVZ.cjs +0 -1
- package/dist/index-BlCmv2EJ.cjs +0 -1
- package/dist/index-BlamLFdS.js +0 -76
- package/dist/index-By8a3eg5.cjs +0 -1
- package/dist/index-C0sjoDdy.js +0 -309
- package/dist/index-C9RMQY3t.cjs +0 -1
- package/dist/index-CDBeAhhM.js +0 -289
- package/dist/index-CH2HgQJF.cjs +0 -1
- package/dist/index-CT9YDHSn.js +0 -74
- package/dist/index-CUZnWZnQ.cjs +0 -3
- package/dist/index-CVNvgkJN.js +0 -342
- package/dist/index-C_NT6gCL.cjs +0 -1
- package/dist/index-CafCsH0Z.cjs +0 -1
- package/dist/index-Cei6J0b_.cjs +0 -8
- package/dist/index-CmcOKNW2.js +0 -302
- package/dist/index-CvpdOKX2.js +0 -136
- package/dist/index-CxE1PN5L.cjs +0 -1
- package/dist/index-D2BpI4Zz.cjs +0 -2
- package/dist/index-D40RPDMJ.cjs +0 -1
- package/dist/index-D5iq4kyE.cjs +0 -1
- package/dist/index-DFzKuRY8.cjs +0 -1
- package/dist/index-DIO9qaw5.cjs +0 -1
- package/dist/index-DIR2rO5B.cjs +0 -1
- package/dist/index-DPnQDm6f.js +0 -138
- package/dist/index-DU0jpFGR.cjs +0 -1
- package/dist/index-DUvVsNDG.cjs +0 -13
- package/dist/index-DVZnPL32.js +0 -953
- package/dist/index-DiYfLAVQ.js +0 -554
- package/dist/index-DnIheaHS.js +0 -251
- package/dist/index-Dp2K8q6O.cjs +0 -7
- package/dist/index-DrlNzz-e.js +0 -59
- package/dist/index-Dx9UDsJi.cjs +0 -1
- package/dist/index-DxY-AOQA.js +0 -157
- package/dist/index-Mmd0YHPJ.js +0 -960
- package/dist/index-NyiYUSW3.js +0 -101
- package/dist/index-alBMysbQ.js +0 -1874
- package/dist/index-lEkIbMCl.js +0 -612
- package/dist/index-qwDdlmIi.js +0 -270
- package/dist/index-x3mhc_C_.cjs +0 -1
- package/dist/it-5n3LuTHe.cjs +0 -1
- package/dist/ja-Bdp4_B8-.cjs +0 -1
- package/dist/javascript-C2yteZeJ.js +0 -691
- package/dist/javascript-DngSGg_0.cjs +0 -1
- package/dist/jinja2-DnB6dQmV.js +0 -154
- package/dist/jinja2-wbVbDTNi.cjs +0 -1
- package/dist/julia-DA67Qw9E.cjs +0 -1
- package/dist/julia-DpvXAuO6.js +0 -241
- package/dist/ko-B5SwKB-j.cjs +0 -1
- package/dist/livescript-Bg3URadp.cjs +0 -1
- package/dist/livescript-CanGTf8u.js +0 -272
- package/dist/lua-CIsxjGwi.cjs +0 -1
- package/dist/lua-XplVlWi_.js +0 -217
- package/dist/mathematica-BG089QIc.cjs +0 -1
- package/dist/mathematica-jaRHnSxC.js +0 -35
- package/dist/mbox-BctzC1hL.js +0 -76
- package/dist/mbox-CySolFFZ.cjs +0 -1
- package/dist/milkdown/index.cjs.js +0 -1
- package/dist/milkdown/index.es.js +0 -4
- package/dist/milkdown-input-Bkgdi-Bv.cjs +0 -944
- package/dist/milkdown-input-CciSI_a5.js +0 -63967
- package/dist/milkdown-url-D99P-nA-.js +0 -4
- package/dist/milkdown-url-DqoUZH3u.cjs +0 -1
- package/dist/milkdown.css +0 -1914
- package/dist/mirc-BfqEffzk.cjs +0 -1
- package/dist/mirc-CFBPAOaF.js +0 -72
- package/dist/mllike-BSnXJBGA.js +0 -272
- package/dist/mllike-QUjwI6zq.cjs +0 -1
- package/dist/modal-CAKAT7wv.cjs +0 -1
- package/dist/modelica-B6Zhcb-M.cjs +0 -1
- package/dist/modelica-vUgVs--1.js +0 -93
- package/dist/mscgen-BToym4Bs.cjs +0 -1
- package/dist/mscgen-Cpl0NYLN.js +0 -104
- package/dist/mumps-CQoS1kWX.js +0 -25
- package/dist/mumps-wfyQdxSu.cjs +0 -1
- package/dist/nginx-CwqyBUfA.cjs +0 -1
- package/dist/nginx-zDPm3Z74.js +0 -89
- package/dist/nl-Cenl4nr6.cjs +0 -1
- package/dist/notice-DBME6bFw.cjs +0 -2
- package/dist/notice-DVEacWKt.js +0 -2275
- package/dist/nsis-DPj2fUaP.cjs +0 -1
- package/dist/nsis-fePjrhq7.js +0 -62
- package/dist/ntriples-CsNjv2QF.js +0 -79
- package/dist/ntriples-DgwJmozm.cjs +0 -1
- package/dist/octave-1pkKrgAA.cjs +0 -1
- package/dist/octave-C8PmmSRH.js +0 -143
- package/dist/oz-BXOZCt0U.cjs +0 -1
- package/dist/oz-Ce8aN8oE.js +0 -151
- package/dist/pascal-De0D6mP7.js +0 -77
- package/dist/pascal-DtY2LEkJ.cjs +0 -1
- package/dist/perl-B4bSCe1C.js +0 -915
- package/dist/perl-CVDWbEju.cjs +0 -1
- package/dist/pig-D24Z8EXi.js +0 -54
- package/dist/pig-DMByOrnr.cjs +0 -1
- package/dist/pl-7xYNCk-v.cjs +0 -1
- package/dist/powershell-BaoYaFvj.cjs +0 -1
- package/dist/powershell-DkYVfTzP.js +0 -249
- package/dist/preprocess-CvkqwVNt.cjs +0 -3
- package/dist/preprocess-D898zxsP.js +0 -2295
- package/dist/properties-DXHJZ3WE.cjs +0 -1
- package/dist/properties-Dn9wna3M.js +0 -26
- package/dist/protobuf-BKhXdfH6.cjs +0 -1
- package/dist/protobuf-BPIjwpzm.js +0 -49
- package/dist/pt-DOLL0Jpj.cjs +0 -1
- package/dist/pug-CwAQJzGR.js +0 -248
- package/dist/pug-kEfRDOiF.cjs +0 -1
- package/dist/puppet-8mAyuMbW.cjs +0 -1
- package/dist/puppet-nyd4dhjf.js +0 -45
- package/dist/python-BkR3uSy8.js +0 -313
- package/dist/python-D-iU6WXz.cjs +0 -1
- package/dist/q-BPQ45Nxu.cjs +0 -1
- package/dist/q-DXjKs-tC.js +0 -83
- package/dist/r-LKEuhEGI.js +0 -104
- package/dist/r-r2_EZsON.cjs +0 -1
- package/dist/rpm-IznJm2Xc.js +0 -57
- package/dist/rpm-YK81m3qU.cjs +0 -1
- package/dist/ru-DoS9XuqG.cjs +0 -1
- package/dist/ruby-CcYfvIk6.js +0 -228
- package/dist/ruby-Cn1sFkZF.cjs +0 -1
- package/dist/sas-7E8yHoCW.js +0 -105
- package/dist/sas-DAGcJy94.cjs +0 -1
- package/dist/scheme-B0ZrbojV.cjs +0 -1
- package/dist/scheme-DjibxsNh.js +0 -124
- package/dist/shell-BMYo43V6.cjs +0 -1
- package/dist/shell-C0C2sNA_.js +0 -182
- package/dist/sieve-Bwz7vjP5.js +0 -72
- package/dist/sieve-CIYW-b_H.cjs +0 -1
- package/dist/simple-mode-B0dvCdAA.js +0 -89
- package/dist/simple-mode-BIKNPBes.cjs +0 -1
- package/dist/smalltalk-Bhddl2pB.js +0 -48
- package/dist/smalltalk-CSslY-3i.cjs +0 -1
- package/dist/solr-A1kSnAwJ.cjs +0 -1
- package/dist/solr-BNlsLglM.js +0 -41
- package/dist/sparql-DnHMBLLY.cjs +0 -1
- package/dist/sparql-FarWu_Gb.js +0 -197
- package/dist/spreadsheet-B7_BK8hB.cjs +0 -1
- package/dist/spreadsheet-C-cy4P5N.js +0 -49
- package/dist/sql-9VmIWHrZ.cjs +0 -1
- package/dist/sql-CfG5lQ3l.js +0 -282
- package/dist/stex-B4wyjEnp.cjs +0 -1
- package/dist/stex-Du4h4KAU.js +0 -129
- package/dist/stylus-CAdqWld3.js +0 -250
- package/dist/stylus-D6GYOT3Z.cjs +0 -1
- package/dist/swift-DGw6Cgu8.cjs +0 -1
- package/dist/swift-DSxqR9R6.js +0 -230
- package/dist/tcl-ByLXbQFo.cjs +0 -1
- package/dist/tcl-xfoLljhY.js +0 -81
- package/dist/textile-D1AWE-pc.js +0 -295
- package/dist/textile-iryw-lTw.cjs +0 -1
- package/dist/theme-CJVt8QIc.js +0 -34
- package/dist/theme-YS3sFklH.cjs +0 -1
- package/dist/tiddlywiki-5wqsXtSk.js +0 -155
- package/dist/tiddlywiki-D8IJz1k7.cjs +0 -1
- package/dist/tiki-C5p5KSQK.cjs +0 -1
- package/dist/tiki-__Kn3CeS.js +0 -181
- package/dist/toml-3ZsH_4Qa.cjs +0 -1
- package/dist/toml-BHiuTcfn.js +0 -49
- package/dist/tr-BVmoz40w.cjs +0 -1
- package/dist/translations-Dv56lQia.cjs +0 -1
- package/dist/troff-D-3QCOYN.cjs +0 -1
- package/dist/troff-D2UO-fKf.js +0 -35
- package/dist/ttcn-Bsa4sfRm.js +0 -123
- package/dist/ttcn-C2MXAqcM.cjs +0 -1
- package/dist/ttcn-cfg-BYqcMRxC.cjs +0 -1
- package/dist/ttcn-cfg-Bac_acMi.js +0 -88
- package/dist/turtle-DSJNatSv.cjs +0 -1
- package/dist/turtle-xwJUxoPV.js +0 -80
- package/dist/types/components/milkdown/milkdown-input.d.ts +0 -15
- package/dist/types/milkdown/index.d.ts +0 -1
- package/dist/ur-orNTOdMP.cjs +0 -1
- package/dist/utils-Dobqjl2y.cjs +0 -1
- package/dist/vb-c2kQGd6-.js +0 -74
- package/dist/vb-qzHzzvyB.cjs +0 -1
- package/dist/vbscript-1f_Dhg5H.js +0 -324
- package/dist/vbscript-CWm8v9tE.cjs +0 -1
- package/dist/velocity-D3_yAIp3.cjs +0 -1
- package/dist/velocity-DJd0pTTC.js +0 -96
- package/dist/verilog-BOhLNmQo.cjs +0 -1
- package/dist/verilog-CiS1jyi5.js +0 -262
- package/dist/vhdl-CMFbi8Im.cjs +0 -1
- package/dist/vhdl-T9HkrbI2.js +0 -106
- package/dist/vi-BWyUDP07.cjs +0 -1
- package/dist/webidl-CWb_flNk.cjs +0 -1
- package/dist/webidl-CjfDENEo.js +0 -155
- package/dist/xquery-BUQdORAS.js +0 -422
- package/dist/xquery-Cjw5fRnG.cjs +0 -1
- package/dist/yacas-C0absKBh.js +0 -73
- package/dist/yacas-urx_N5C8.cjs +0 -1
- package/dist/z80-CsG3CM6M.cjs +0 -1
- package/dist/z80-Pki2zAjW.js +0 -61
- package/dist/zh-RVJj1NQq.cjs +0 -1
- /package/dist/types/{components/milkdown/milkdown-url.d.ts → prosemirror/styles-url.d.ts} +0 -0
- /package/dist/types/{milkdown → prosemirror}/styles.d.ts +0 -0
package/dist/index-BMn-7Ble.js
DELETED
|
@@ -1,1307 +0,0 @@
|
|
|
1
|
-
import { P as L, N as M, g as $, D as E, h as y, T as S, I as j } from "./milkdown-input-CciSI_a5.js";
|
|
2
|
-
class v {
|
|
3
|
-
/**
|
|
4
|
-
@internal
|
|
5
|
-
*/
|
|
6
|
-
constructor(t, e, s, i, h, r, n, o, a, u = 0, f) {
|
|
7
|
-
this.p = t, this.stack = e, this.state = s, this.reducePos = i, this.pos = h, this.score = r, this.buffer = n, this.bufferBase = o, this.curContext = a, this.lookAhead = u, this.parent = f;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
@internal
|
|
11
|
-
*/
|
|
12
|
-
toString() {
|
|
13
|
-
return `[${this.stack.filter((t, e) => e % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
|
|
14
|
-
}
|
|
15
|
-
// Start an empty stack
|
|
16
|
-
/**
|
|
17
|
-
@internal
|
|
18
|
-
*/
|
|
19
|
-
static start(t, e, s = 0) {
|
|
20
|
-
let i = t.parser.context;
|
|
21
|
-
return new v(t, [], e, s, s, 0, [], 0, i ? new N(i, i.start) : null, 0, null);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
The stack's current [context](#lr.ContextTracker) value, if
|
|
25
|
-
any. Its type will depend on the context tracker's type
|
|
26
|
-
parameter, or it will be `null` if there is no context
|
|
27
|
-
tracker.
|
|
28
|
-
*/
|
|
29
|
-
get context() {
|
|
30
|
-
return this.curContext ? this.curContext.context : null;
|
|
31
|
-
}
|
|
32
|
-
// Push a state onto the stack, tracking its start position as well
|
|
33
|
-
// as the buffer base at that point.
|
|
34
|
-
/**
|
|
35
|
-
@internal
|
|
36
|
-
*/
|
|
37
|
-
pushState(t, e) {
|
|
38
|
-
this.stack.push(this.state, e, this.bufferBase + this.buffer.length), this.state = t;
|
|
39
|
-
}
|
|
40
|
-
// Apply a reduce action
|
|
41
|
-
/**
|
|
42
|
-
@internal
|
|
43
|
-
*/
|
|
44
|
-
reduce(t) {
|
|
45
|
-
var e;
|
|
46
|
-
let s = t >> 19, i = t & 65535, { parser: h } = this.p, r = this.reducePos < this.pos - 25;
|
|
47
|
-
r && this.setLookAhead(this.pos);
|
|
48
|
-
let n = h.dynamicPrecedence(i);
|
|
49
|
-
if (n && (this.score += n), s == 0) {
|
|
50
|
-
this.pushState(h.getGoto(this.state, i, !0), this.reducePos), i < h.minRepeatTerm && this.storeNode(i, this.reducePos, this.reducePos, r ? 8 : 4, !0), this.reduceContext(i, this.reducePos);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
let o = this.stack.length - (s - 1) * 3 - (t & 262144 ? 6 : 0), a = o ? this.stack[o - 2] : this.p.ranges[0].from, u = this.reducePos - a;
|
|
54
|
-
u >= 2e3 && !(!((e = this.p.parser.nodeSet.types[i]) === null || e === void 0) && e.isAnonymous) && (a == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = u) : this.p.lastBigReductionSize < u && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = a, this.p.lastBigReductionSize = u));
|
|
55
|
-
let f = o ? this.stack[o - 1] : 0, p = this.bufferBase + this.buffer.length - f;
|
|
56
|
-
if (i < h.minRepeatTerm || t & 131072) {
|
|
57
|
-
let c = h.stateFlag(
|
|
58
|
-
this.state,
|
|
59
|
-
1
|
|
60
|
-
/* StateFlag.Skipped */
|
|
61
|
-
) ? this.pos : this.reducePos;
|
|
62
|
-
this.storeNode(i, a, c, p + 4, !0);
|
|
63
|
-
}
|
|
64
|
-
if (t & 262144)
|
|
65
|
-
this.state = this.stack[o];
|
|
66
|
-
else {
|
|
67
|
-
let c = this.stack[o - 3];
|
|
68
|
-
this.state = h.getGoto(c, i, !0);
|
|
69
|
-
}
|
|
70
|
-
for (; this.stack.length > o; )
|
|
71
|
-
this.stack.pop();
|
|
72
|
-
this.reduceContext(i, a);
|
|
73
|
-
}
|
|
74
|
-
// Shift a value into the buffer
|
|
75
|
-
/**
|
|
76
|
-
@internal
|
|
77
|
-
*/
|
|
78
|
-
storeNode(t, e, s, i = 4, h = !1) {
|
|
79
|
-
if (t == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
|
|
80
|
-
let r = this, n = this.buffer.length;
|
|
81
|
-
if (n == 0 && r.parent && (n = r.bufferBase - r.parent.bufferBase, r = r.parent), n > 0 && r.buffer[n - 4] == 0 && r.buffer[n - 1] > -1) {
|
|
82
|
-
if (e == s)
|
|
83
|
-
return;
|
|
84
|
-
if (r.buffer[n - 2] >= e) {
|
|
85
|
-
r.buffer[n - 2] = s;
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (!h || this.pos == s)
|
|
91
|
-
this.buffer.push(t, e, s, i);
|
|
92
|
-
else {
|
|
93
|
-
let r = this.buffer.length;
|
|
94
|
-
if (r > 0 && this.buffer[r - 4] != 0) {
|
|
95
|
-
let n = !1;
|
|
96
|
-
for (let o = r; o > 0 && this.buffer[o - 2] > s; o -= 4)
|
|
97
|
-
if (this.buffer[o - 1] >= 0) {
|
|
98
|
-
n = !0;
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
if (n)
|
|
102
|
-
for (; r > 0 && this.buffer[r - 2] > s; )
|
|
103
|
-
this.buffer[r] = this.buffer[r - 4], this.buffer[r + 1] = this.buffer[r - 3], this.buffer[r + 2] = this.buffer[r - 2], this.buffer[r + 3] = this.buffer[r - 1], r -= 4, i > 4 && (i -= 4);
|
|
104
|
-
}
|
|
105
|
-
this.buffer[r] = t, this.buffer[r + 1] = e, this.buffer[r + 2] = s, this.buffer[r + 3] = i;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
// Apply a shift action
|
|
109
|
-
/**
|
|
110
|
-
@internal
|
|
111
|
-
*/
|
|
112
|
-
shift(t, e, s, i) {
|
|
113
|
-
if (t & 131072)
|
|
114
|
-
this.pushState(t & 65535, this.pos);
|
|
115
|
-
else if ((t & 262144) == 0) {
|
|
116
|
-
let h = t, { parser: r } = this.p;
|
|
117
|
-
(i > this.pos || e <= r.maxNode) && (this.pos = i, r.stateFlag(
|
|
118
|
-
h,
|
|
119
|
-
1
|
|
120
|
-
/* StateFlag.Skipped */
|
|
121
|
-
) || (this.reducePos = i)), this.pushState(h, s), this.shiftContext(e, s), e <= r.maxNode && this.buffer.push(e, s, i, 4);
|
|
122
|
-
} else
|
|
123
|
-
this.pos = i, this.shiftContext(e, s), e <= this.p.parser.maxNode && this.buffer.push(e, s, i, 4);
|
|
124
|
-
}
|
|
125
|
-
// Apply an action
|
|
126
|
-
/**
|
|
127
|
-
@internal
|
|
128
|
-
*/
|
|
129
|
-
apply(t, e, s, i) {
|
|
130
|
-
t & 65536 ? this.reduce(t) : this.shift(t, e, s, i);
|
|
131
|
-
}
|
|
132
|
-
// Add a prebuilt (reused) node into the buffer.
|
|
133
|
-
/**
|
|
134
|
-
@internal
|
|
135
|
-
*/
|
|
136
|
-
useNode(t, e) {
|
|
137
|
-
let s = this.p.reused.length - 1;
|
|
138
|
-
(s < 0 || this.p.reused[s] != t) && (this.p.reused.push(t), s++);
|
|
139
|
-
let i = this.pos;
|
|
140
|
-
this.reducePos = this.pos = i + t.length, this.pushState(e, i), this.buffer.push(
|
|
141
|
-
s,
|
|
142
|
-
i,
|
|
143
|
-
this.reducePos,
|
|
144
|
-
-1
|
|
145
|
-
/* size == -1 means this is a reused value */
|
|
146
|
-
), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, t, this, this.p.stream.reset(this.pos - t.length)));
|
|
147
|
-
}
|
|
148
|
-
// Split the stack. Due to the buffer sharing and the fact
|
|
149
|
-
// that `this.stack` tends to stay quite shallow, this isn't very
|
|
150
|
-
// expensive.
|
|
151
|
-
/**
|
|
152
|
-
@internal
|
|
153
|
-
*/
|
|
154
|
-
split() {
|
|
155
|
-
let t = this, e = t.buffer.length;
|
|
156
|
-
for (; e > 0 && t.buffer[e - 2] > t.reducePos; )
|
|
157
|
-
e -= 4;
|
|
158
|
-
let s = t.buffer.slice(e), i = t.bufferBase + e;
|
|
159
|
-
for (; t && i == t.bufferBase; )
|
|
160
|
-
t = t.parent;
|
|
161
|
-
return new v(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, s, i, this.curContext, this.lookAhead, t);
|
|
162
|
-
}
|
|
163
|
-
// Try to recover from an error by 'deleting' (ignoring) one token.
|
|
164
|
-
/**
|
|
165
|
-
@internal
|
|
166
|
-
*/
|
|
167
|
-
recoverByDelete(t, e) {
|
|
168
|
-
let s = t <= this.p.parser.maxNode;
|
|
169
|
-
s && this.storeNode(t, this.pos, e, 4), this.storeNode(0, this.pos, e, s ? 8 : 4), this.pos = this.reducePos = e, this.score -= 190;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
Check if the given term would be able to be shifted (optionally
|
|
173
|
-
after some reductions) on this stack. This can be useful for
|
|
174
|
-
external tokenizers that want to make sure they only provide a
|
|
175
|
-
given token when it applies.
|
|
176
|
-
*/
|
|
177
|
-
canShift(t) {
|
|
178
|
-
for (let e = new G(this); ; ) {
|
|
179
|
-
let s = this.p.parser.stateSlot(
|
|
180
|
-
e.state,
|
|
181
|
-
4
|
|
182
|
-
/* ParseState.DefaultReduce */
|
|
183
|
-
) || this.p.parser.hasAction(e.state, t);
|
|
184
|
-
if (s == 0)
|
|
185
|
-
return !1;
|
|
186
|
-
if ((s & 65536) == 0)
|
|
187
|
-
return !0;
|
|
188
|
-
e.reduce(s);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
// Apply up to Recover.MaxNext recovery actions that conceptually
|
|
192
|
-
// inserts some missing token or rule.
|
|
193
|
-
/**
|
|
194
|
-
@internal
|
|
195
|
-
*/
|
|
196
|
-
recoverByInsert(t) {
|
|
197
|
-
if (this.stack.length >= 300)
|
|
198
|
-
return [];
|
|
199
|
-
let e = this.p.parser.nextStates(this.state);
|
|
200
|
-
if (e.length > 8 || this.stack.length >= 120) {
|
|
201
|
-
let i = [];
|
|
202
|
-
for (let h = 0, r; h < e.length; h += 2)
|
|
203
|
-
(r = e[h + 1]) != this.state && this.p.parser.hasAction(r, t) && i.push(e[h], r);
|
|
204
|
-
if (this.stack.length < 120)
|
|
205
|
-
for (let h = 0; i.length < 8 && h < e.length; h += 2) {
|
|
206
|
-
let r = e[h + 1];
|
|
207
|
-
i.some((n, o) => o & 1 && n == r) || i.push(e[h], r);
|
|
208
|
-
}
|
|
209
|
-
e = i;
|
|
210
|
-
}
|
|
211
|
-
let s = [];
|
|
212
|
-
for (let i = 0; i < e.length && s.length < 4; i += 2) {
|
|
213
|
-
let h = e[i + 1];
|
|
214
|
-
if (h == this.state)
|
|
215
|
-
continue;
|
|
216
|
-
let r = this.split();
|
|
217
|
-
r.pushState(h, this.pos), r.storeNode(0, r.pos, r.pos, 4, !0), r.shiftContext(e[i], this.pos), r.reducePos = this.pos, r.score -= 200, s.push(r);
|
|
218
|
-
}
|
|
219
|
-
return s;
|
|
220
|
-
}
|
|
221
|
-
// Force a reduce, if possible. Return false if that can't
|
|
222
|
-
// be done.
|
|
223
|
-
/**
|
|
224
|
-
@internal
|
|
225
|
-
*/
|
|
226
|
-
forceReduce() {
|
|
227
|
-
let { parser: t } = this.p, e = t.stateSlot(
|
|
228
|
-
this.state,
|
|
229
|
-
5
|
|
230
|
-
/* ParseState.ForcedReduce */
|
|
231
|
-
);
|
|
232
|
-
if ((e & 65536) == 0)
|
|
233
|
-
return !1;
|
|
234
|
-
if (!t.validAction(this.state, e)) {
|
|
235
|
-
let s = e >> 19, i = e & 65535, h = this.stack.length - s * 3;
|
|
236
|
-
if (h < 0 || t.getGoto(this.stack[h], i, !1) < 0) {
|
|
237
|
-
let r = this.findForcedReduction();
|
|
238
|
-
if (r == null)
|
|
239
|
-
return !1;
|
|
240
|
-
e = r;
|
|
241
|
-
}
|
|
242
|
-
this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
|
|
243
|
-
}
|
|
244
|
-
return this.reducePos = this.pos, this.reduce(e), !0;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
Try to scan through the automaton to find some kind of reduction
|
|
248
|
-
that can be applied. Used when the regular ForcedReduce field
|
|
249
|
-
isn't a valid action. @internal
|
|
250
|
-
*/
|
|
251
|
-
findForcedReduction() {
|
|
252
|
-
let { parser: t } = this.p, e = [], s = (i, h) => {
|
|
253
|
-
if (!e.includes(i))
|
|
254
|
-
return e.push(i), t.allActions(i, (r) => {
|
|
255
|
-
if (!(r & 393216)) if (r & 65536) {
|
|
256
|
-
let n = (r >> 19) - h;
|
|
257
|
-
if (n > 1) {
|
|
258
|
-
let o = r & 65535, a = this.stack.length - n * 3;
|
|
259
|
-
if (a >= 0 && t.getGoto(this.stack[a], o, !1) >= 0)
|
|
260
|
-
return n << 19 | 65536 | o;
|
|
261
|
-
}
|
|
262
|
-
} else {
|
|
263
|
-
let n = s(r, h + 1);
|
|
264
|
-
if (n != null)
|
|
265
|
-
return n;
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
};
|
|
269
|
-
return s(this.state, 0);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
@internal
|
|
273
|
-
*/
|
|
274
|
-
forceAll() {
|
|
275
|
-
for (; !this.p.parser.stateFlag(
|
|
276
|
-
this.state,
|
|
277
|
-
2
|
|
278
|
-
/* StateFlag.Accepting */
|
|
279
|
-
); )
|
|
280
|
-
if (!this.forceReduce()) {
|
|
281
|
-
this.storeNode(0, this.pos, this.pos, 4, !0);
|
|
282
|
-
break;
|
|
283
|
-
}
|
|
284
|
-
return this;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
Check whether this state has no further actions (assumed to be a direct descendant of the
|
|
288
|
-
top state, since any other states must be able to continue
|
|
289
|
-
somehow). @internal
|
|
290
|
-
*/
|
|
291
|
-
get deadEnd() {
|
|
292
|
-
if (this.stack.length != 3)
|
|
293
|
-
return !1;
|
|
294
|
-
let { parser: t } = this.p;
|
|
295
|
-
return t.data[t.stateSlot(
|
|
296
|
-
this.state,
|
|
297
|
-
1
|
|
298
|
-
/* ParseState.Actions */
|
|
299
|
-
)] == 65535 && !t.stateSlot(
|
|
300
|
-
this.state,
|
|
301
|
-
4
|
|
302
|
-
/* ParseState.DefaultReduce */
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
Restart the stack (put it back in its start state). Only safe
|
|
307
|
-
when this.stack.length == 3 (state is directly below the top
|
|
308
|
-
state). @internal
|
|
309
|
-
*/
|
|
310
|
-
restart() {
|
|
311
|
-
this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
@internal
|
|
315
|
-
*/
|
|
316
|
-
sameState(t) {
|
|
317
|
-
if (this.state != t.state || this.stack.length != t.stack.length)
|
|
318
|
-
return !1;
|
|
319
|
-
for (let e = 0; e < this.stack.length; e += 3)
|
|
320
|
-
if (this.stack[e] != t.stack[e])
|
|
321
|
-
return !1;
|
|
322
|
-
return !0;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
Get the parser used by this stack.
|
|
326
|
-
*/
|
|
327
|
-
get parser() {
|
|
328
|
-
return this.p.parser;
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
Test whether a given dialect (by numeric ID, as exported from
|
|
332
|
-
the terms file) is enabled.
|
|
333
|
-
*/
|
|
334
|
-
dialectEnabled(t) {
|
|
335
|
-
return this.p.parser.dialect.flags[t];
|
|
336
|
-
}
|
|
337
|
-
shiftContext(t, e) {
|
|
338
|
-
this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, t, this, this.p.stream.reset(e)));
|
|
339
|
-
}
|
|
340
|
-
reduceContext(t, e) {
|
|
341
|
-
this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, t, this, this.p.stream.reset(e)));
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
@internal
|
|
345
|
-
*/
|
|
346
|
-
emitContext() {
|
|
347
|
-
let t = this.buffer.length - 1;
|
|
348
|
-
(t < 0 || this.buffer[t] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
@internal
|
|
352
|
-
*/
|
|
353
|
-
emitLookAhead() {
|
|
354
|
-
let t = this.buffer.length - 1;
|
|
355
|
-
(t < 0 || this.buffer[t] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
|
|
356
|
-
}
|
|
357
|
-
updateContext(t) {
|
|
358
|
-
if (t != this.curContext.context) {
|
|
359
|
-
let e = new N(this.curContext.tracker, t);
|
|
360
|
-
e.hash != this.curContext.hash && this.emitContext(), this.curContext = e;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
@internal
|
|
365
|
-
*/
|
|
366
|
-
setLookAhead(t) {
|
|
367
|
-
t > this.lookAhead && (this.emitLookAhead(), this.lookAhead = t);
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
@internal
|
|
371
|
-
*/
|
|
372
|
-
close() {
|
|
373
|
-
this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
class N {
|
|
377
|
-
constructor(t, e) {
|
|
378
|
-
this.tracker = t, this.context = e, this.hash = t.strict ? t.hash(e) : 0;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
class G {
|
|
382
|
-
constructor(t) {
|
|
383
|
-
this.start = t, this.state = t.state, this.stack = t.stack, this.base = this.stack.length;
|
|
384
|
-
}
|
|
385
|
-
reduce(t) {
|
|
386
|
-
let e = t & 65535, s = t >> 19;
|
|
387
|
-
s == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (s - 1) * 3;
|
|
388
|
-
let i = this.start.p.parser.getGoto(this.stack[this.base - 3], e, !0);
|
|
389
|
-
this.state = i;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
class A {
|
|
393
|
-
constructor(t, e, s) {
|
|
394
|
-
this.stack = t, this.pos = e, this.index = s, this.buffer = t.buffer, this.index == 0 && this.maybeNext();
|
|
395
|
-
}
|
|
396
|
-
static create(t, e = t.bufferBase + t.buffer.length) {
|
|
397
|
-
return new A(t, e, e - t.bufferBase);
|
|
398
|
-
}
|
|
399
|
-
maybeNext() {
|
|
400
|
-
let t = this.stack.parent;
|
|
401
|
-
t != null && (this.index = this.stack.bufferBase - t.bufferBase, this.stack = t, this.buffer = t.buffer);
|
|
402
|
-
}
|
|
403
|
-
get id() {
|
|
404
|
-
return this.buffer[this.index - 4];
|
|
405
|
-
}
|
|
406
|
-
get start() {
|
|
407
|
-
return this.buffer[this.index - 3];
|
|
408
|
-
}
|
|
409
|
-
get end() {
|
|
410
|
-
return this.buffer[this.index - 2];
|
|
411
|
-
}
|
|
412
|
-
get size() {
|
|
413
|
-
return this.buffer[this.index - 1];
|
|
414
|
-
}
|
|
415
|
-
next() {
|
|
416
|
-
this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
|
|
417
|
-
}
|
|
418
|
-
fork() {
|
|
419
|
-
return new A(this.stack, this.pos, this.index);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
function x(l, t = Uint16Array) {
|
|
423
|
-
if (typeof l != "string")
|
|
424
|
-
return l;
|
|
425
|
-
let e = null;
|
|
426
|
-
for (let s = 0, i = 0; s < l.length; ) {
|
|
427
|
-
let h = 0;
|
|
428
|
-
for (; ; ) {
|
|
429
|
-
let r = l.charCodeAt(s++), n = !1;
|
|
430
|
-
if (r == 126) {
|
|
431
|
-
h = 65535;
|
|
432
|
-
break;
|
|
433
|
-
}
|
|
434
|
-
r >= 92 && r--, r >= 34 && r--;
|
|
435
|
-
let o = r - 32;
|
|
436
|
-
if (o >= 46 && (o -= 46, n = !0), h += o, n)
|
|
437
|
-
break;
|
|
438
|
-
h *= 46;
|
|
439
|
-
}
|
|
440
|
-
e ? e[i++] = h : e = new t(h);
|
|
441
|
-
}
|
|
442
|
-
return e;
|
|
443
|
-
}
|
|
444
|
-
class P {
|
|
445
|
-
constructor() {
|
|
446
|
-
this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
const R = new P();
|
|
450
|
-
class U {
|
|
451
|
-
/**
|
|
452
|
-
@internal
|
|
453
|
-
*/
|
|
454
|
-
constructor(t, e) {
|
|
455
|
-
this.input = t, this.ranges = e, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = R, this.rangeIndex = 0, this.pos = this.chunkPos = e[0].from, this.range = e[0], this.end = e[e.length - 1].to, this.readNext();
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
@internal
|
|
459
|
-
*/
|
|
460
|
-
resolveOffset(t, e) {
|
|
461
|
-
let s = this.range, i = this.rangeIndex, h = this.pos + t;
|
|
462
|
-
for (; h < s.from; ) {
|
|
463
|
-
if (!i)
|
|
464
|
-
return null;
|
|
465
|
-
let r = this.ranges[--i];
|
|
466
|
-
h -= s.from - r.to, s = r;
|
|
467
|
-
}
|
|
468
|
-
for (; e < 0 ? h > s.to : h >= s.to; ) {
|
|
469
|
-
if (i == this.ranges.length - 1)
|
|
470
|
-
return null;
|
|
471
|
-
let r = this.ranges[++i];
|
|
472
|
-
h += r.from - s.to, s = r;
|
|
473
|
-
}
|
|
474
|
-
return h;
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
@internal
|
|
478
|
-
*/
|
|
479
|
-
clipPos(t) {
|
|
480
|
-
if (t >= this.range.from && t < this.range.to)
|
|
481
|
-
return t;
|
|
482
|
-
for (let e of this.ranges)
|
|
483
|
-
if (e.to > t)
|
|
484
|
-
return Math.max(t, e.from);
|
|
485
|
-
return this.end;
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
Look at a code unit near the stream position. `.peek(0)` equals
|
|
489
|
-
`.next`, `.peek(-1)` gives you the previous character, and so
|
|
490
|
-
on.
|
|
491
|
-
|
|
492
|
-
Note that looking around during tokenizing creates dependencies
|
|
493
|
-
on potentially far-away content, which may reduce the
|
|
494
|
-
effectiveness incremental parsing—when looking forward—or even
|
|
495
|
-
cause invalid reparses when looking backward more than 25 code
|
|
496
|
-
units, since the library does not track lookbehind.
|
|
497
|
-
*/
|
|
498
|
-
peek(t) {
|
|
499
|
-
let e = this.chunkOff + t, s, i;
|
|
500
|
-
if (e >= 0 && e < this.chunk.length)
|
|
501
|
-
s = this.pos + t, i = this.chunk.charCodeAt(e);
|
|
502
|
-
else {
|
|
503
|
-
let h = this.resolveOffset(t, 1);
|
|
504
|
-
if (h == null)
|
|
505
|
-
return -1;
|
|
506
|
-
if (s = h, s >= this.chunk2Pos && s < this.chunk2Pos + this.chunk2.length)
|
|
507
|
-
i = this.chunk2.charCodeAt(s - this.chunk2Pos);
|
|
508
|
-
else {
|
|
509
|
-
let r = this.rangeIndex, n = this.range;
|
|
510
|
-
for (; n.to <= s; )
|
|
511
|
-
n = this.ranges[++r];
|
|
512
|
-
this.chunk2 = this.input.chunk(this.chunk2Pos = s), s + this.chunk2.length > n.to && (this.chunk2 = this.chunk2.slice(0, n.to - s)), i = this.chunk2.charCodeAt(0);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
return s >= this.token.lookAhead && (this.token.lookAhead = s + 1), i;
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
Accept a token. By default, the end of the token is set to the
|
|
519
|
-
current stream position, but you can pass an offset (relative to
|
|
520
|
-
the stream position) to change that.
|
|
521
|
-
*/
|
|
522
|
-
acceptToken(t, e = 0) {
|
|
523
|
-
let s = e ? this.resolveOffset(e, -1) : this.pos;
|
|
524
|
-
if (s == null || s < this.token.start)
|
|
525
|
-
throw new RangeError("Token end out of bounds");
|
|
526
|
-
this.token.value = t, this.token.end = s;
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
Accept a token ending at a specific given position.
|
|
530
|
-
*/
|
|
531
|
-
acceptTokenTo(t, e) {
|
|
532
|
-
this.token.value = t, this.token.end = e;
|
|
533
|
-
}
|
|
534
|
-
getChunk() {
|
|
535
|
-
if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
|
|
536
|
-
let { chunk: t, chunkPos: e } = this;
|
|
537
|
-
this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = t, this.chunk2Pos = e, this.chunkOff = this.pos - this.chunkPos;
|
|
538
|
-
} else {
|
|
539
|
-
this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
|
|
540
|
-
let t = this.input.chunk(this.pos), e = this.pos + t.length;
|
|
541
|
-
this.chunk = e > this.range.to ? t.slice(0, this.range.to - this.pos) : t, this.chunkPos = this.pos, this.chunkOff = 0;
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
readNext() {
|
|
545
|
-
return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
Move the stream forward N (defaults to 1) code units. Returns
|
|
549
|
-
the new value of [`next`](#lr.InputStream.next).
|
|
550
|
-
*/
|
|
551
|
-
advance(t = 1) {
|
|
552
|
-
for (this.chunkOff += t; this.pos + t >= this.range.to; ) {
|
|
553
|
-
if (this.rangeIndex == this.ranges.length - 1)
|
|
554
|
-
return this.setDone();
|
|
555
|
-
t -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
|
|
556
|
-
}
|
|
557
|
-
return this.pos += t, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
|
|
558
|
-
}
|
|
559
|
-
setDone() {
|
|
560
|
-
return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
@internal
|
|
564
|
-
*/
|
|
565
|
-
reset(t, e) {
|
|
566
|
-
if (e ? (this.token = e, e.start = t, e.lookAhead = t + 1, e.value = e.extended = -1) : this.token = R, this.pos != t) {
|
|
567
|
-
if (this.pos = t, t == this.end)
|
|
568
|
-
return this.setDone(), this;
|
|
569
|
-
for (; t < this.range.from; )
|
|
570
|
-
this.range = this.ranges[--this.rangeIndex];
|
|
571
|
-
for (; t >= this.range.to; )
|
|
572
|
-
this.range = this.ranges[++this.rangeIndex];
|
|
573
|
-
t >= this.chunkPos && t < this.chunkPos + this.chunk.length ? this.chunkOff = t - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
|
|
574
|
-
}
|
|
575
|
-
return this;
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
@internal
|
|
579
|
-
*/
|
|
580
|
-
read(t, e) {
|
|
581
|
-
if (t >= this.chunkPos && e <= this.chunkPos + this.chunk.length)
|
|
582
|
-
return this.chunk.slice(t - this.chunkPos, e - this.chunkPos);
|
|
583
|
-
if (t >= this.chunk2Pos && e <= this.chunk2Pos + this.chunk2.length)
|
|
584
|
-
return this.chunk2.slice(t - this.chunk2Pos, e - this.chunk2Pos);
|
|
585
|
-
if (t >= this.range.from && e <= this.range.to)
|
|
586
|
-
return this.input.read(t, e);
|
|
587
|
-
let s = "";
|
|
588
|
-
for (let i of this.ranges) {
|
|
589
|
-
if (i.from >= e)
|
|
590
|
-
break;
|
|
591
|
-
i.to > t && (s += this.input.read(Math.max(i.from, t), Math.min(i.to, e)));
|
|
592
|
-
}
|
|
593
|
-
return s;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
class m {
|
|
597
|
-
constructor(t, e) {
|
|
598
|
-
this.data = t, this.id = e;
|
|
599
|
-
}
|
|
600
|
-
token(t, e) {
|
|
601
|
-
let { parser: s } = e.p;
|
|
602
|
-
F(this.data, t, e, this.id, s.data, s.tokenPrecTable);
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
m.prototype.contextual = m.prototype.fallback = m.prototype.extend = !1;
|
|
606
|
-
class H {
|
|
607
|
-
constructor(t, e, s) {
|
|
608
|
-
this.precTable = e, this.elseToken = s, this.data = typeof t == "string" ? x(t) : t;
|
|
609
|
-
}
|
|
610
|
-
token(t, e) {
|
|
611
|
-
let s = t.pos, i = 0;
|
|
612
|
-
for (; ; ) {
|
|
613
|
-
let h = t.next < 0, r = t.resolveOffset(1, 1);
|
|
614
|
-
if (F(this.data, t, e, 0, this.data, this.precTable), t.token.value > -1)
|
|
615
|
-
break;
|
|
616
|
-
if (this.elseToken == null)
|
|
617
|
-
return;
|
|
618
|
-
if (h || i++, r == null)
|
|
619
|
-
break;
|
|
620
|
-
t.reset(r, t.token);
|
|
621
|
-
}
|
|
622
|
-
i && (t.reset(s, t.token), t.acceptToken(this.elseToken, i));
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
H.prototype.contextual = m.prototype.fallback = m.prototype.extend = !1;
|
|
626
|
-
class Y {
|
|
627
|
-
/**
|
|
628
|
-
Create a tokenizer. The first argument is the function that,
|
|
629
|
-
given an input stream, scans for the types of tokens it
|
|
630
|
-
recognizes at the stream's position, and calls
|
|
631
|
-
[`acceptToken`](#lr.InputStream.acceptToken) when it finds
|
|
632
|
-
one.
|
|
633
|
-
*/
|
|
634
|
-
constructor(t, e = {}) {
|
|
635
|
-
this.token = t, this.contextual = !!e.contextual, this.fallback = !!e.fallback, this.extend = !!e.extend;
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
function F(l, t, e, s, i, h) {
|
|
639
|
-
let r = 0, n = 1 << s, { dialect: o } = e.p.parser;
|
|
640
|
-
t: for (; (n & l[r]) != 0; ) {
|
|
641
|
-
let a = l[r + 1];
|
|
642
|
-
for (let c = r + 3; c < a; c += 2)
|
|
643
|
-
if ((l[c + 1] & n) > 0) {
|
|
644
|
-
let d = l[c];
|
|
645
|
-
if (o.allows(d) && (t.token.value == -1 || t.token.value == d || W(d, t.token.value, i, h))) {
|
|
646
|
-
t.acceptToken(d);
|
|
647
|
-
break;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
let u = t.next, f = 0, p = l[r + 2];
|
|
651
|
-
if (t.next < 0 && p > f && l[a + p * 3 - 3] == 65535) {
|
|
652
|
-
r = l[a + p * 3 - 1];
|
|
653
|
-
continue t;
|
|
654
|
-
}
|
|
655
|
-
for (; f < p; ) {
|
|
656
|
-
let c = f + p >> 1, d = a + c + (c << 1), b = l[d], O = l[d + 1] || 65536;
|
|
657
|
-
if (u < b)
|
|
658
|
-
p = c;
|
|
659
|
-
else if (u >= O)
|
|
660
|
-
f = c + 1;
|
|
661
|
-
else {
|
|
662
|
-
r = l[d + 2], t.advance();
|
|
663
|
-
continue t;
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
break;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
function z(l, t, e) {
|
|
670
|
-
for (let s = t, i; (i = l[s]) != 65535; s++)
|
|
671
|
-
if (i == e)
|
|
672
|
-
return s - t;
|
|
673
|
-
return -1;
|
|
674
|
-
}
|
|
675
|
-
function W(l, t, e, s) {
|
|
676
|
-
let i = z(e, s, t);
|
|
677
|
-
return i < 0 || z(e, s, l) < i;
|
|
678
|
-
}
|
|
679
|
-
const g = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
|
|
680
|
-
let T = null;
|
|
681
|
-
function I(l, t, e) {
|
|
682
|
-
let s = l.cursor(j.IncludeAnonymous);
|
|
683
|
-
for (s.moveTo(t); ; )
|
|
684
|
-
if (!(e < 0 ? s.childBefore(t) : s.childAfter(t)))
|
|
685
|
-
for (; ; ) {
|
|
686
|
-
if ((e < 0 ? s.to < t : s.from > t) && !s.type.isError)
|
|
687
|
-
return e < 0 ? Math.max(0, Math.min(
|
|
688
|
-
s.to - 1,
|
|
689
|
-
t - 25
|
|
690
|
-
/* Lookahead.Margin */
|
|
691
|
-
)) : Math.min(l.length, Math.max(
|
|
692
|
-
s.from + 1,
|
|
693
|
-
t + 25
|
|
694
|
-
/* Lookahead.Margin */
|
|
695
|
-
));
|
|
696
|
-
if (e < 0 ? s.prevSibling() : s.nextSibling())
|
|
697
|
-
break;
|
|
698
|
-
if (!s.parent())
|
|
699
|
-
return e < 0 ? 0 : l.length;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
class q {
|
|
703
|
-
constructor(t, e) {
|
|
704
|
-
this.fragments = t, this.nodeSet = e, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
|
|
705
|
-
}
|
|
706
|
-
nextFragment() {
|
|
707
|
-
let t = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
|
|
708
|
-
if (t) {
|
|
709
|
-
for (this.safeFrom = t.openStart ? I(t.tree, t.from + t.offset, 1) - t.offset : t.from, this.safeTo = t.openEnd ? I(t.tree, t.to + t.offset, -1) - t.offset : t.to; this.trees.length; )
|
|
710
|
-
this.trees.pop(), this.start.pop(), this.index.pop();
|
|
711
|
-
this.trees.push(t.tree), this.start.push(-t.offset), this.index.push(0), this.nextStart = this.safeFrom;
|
|
712
|
-
} else
|
|
713
|
-
this.nextStart = 1e9;
|
|
714
|
-
}
|
|
715
|
-
// `pos` must be >= any previously given `pos` for this cursor
|
|
716
|
-
nodeAt(t) {
|
|
717
|
-
if (t < this.nextStart)
|
|
718
|
-
return null;
|
|
719
|
-
for (; this.fragment && this.safeTo <= t; )
|
|
720
|
-
this.nextFragment();
|
|
721
|
-
if (!this.fragment)
|
|
722
|
-
return null;
|
|
723
|
-
for (; ; ) {
|
|
724
|
-
let e = this.trees.length - 1;
|
|
725
|
-
if (e < 0)
|
|
726
|
-
return this.nextFragment(), null;
|
|
727
|
-
let s = this.trees[e], i = this.index[e];
|
|
728
|
-
if (i == s.children.length) {
|
|
729
|
-
this.trees.pop(), this.start.pop(), this.index.pop();
|
|
730
|
-
continue;
|
|
731
|
-
}
|
|
732
|
-
let h = s.children[i], r = this.start[e] + s.positions[i];
|
|
733
|
-
if (r > t)
|
|
734
|
-
return this.nextStart = r, null;
|
|
735
|
-
if (h instanceof S) {
|
|
736
|
-
if (r == t) {
|
|
737
|
-
if (r < this.safeFrom)
|
|
738
|
-
return null;
|
|
739
|
-
let n = r + h.length;
|
|
740
|
-
if (n <= this.safeTo) {
|
|
741
|
-
let o = h.prop(y.lookAhead);
|
|
742
|
-
if (!o || n + o < this.fragment.to)
|
|
743
|
-
return h;
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
this.index[e]++, r + h.length >= Math.max(this.safeFrom, t) && (this.trees.push(h), this.start.push(r), this.index.push(0));
|
|
747
|
-
} else
|
|
748
|
-
this.index[e]++, this.nextStart = r + h.length;
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
class J {
|
|
753
|
-
constructor(t, e) {
|
|
754
|
-
this.stream = e, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = t.tokenizers.map((s) => new P());
|
|
755
|
-
}
|
|
756
|
-
getActions(t) {
|
|
757
|
-
let e = 0, s = null, { parser: i } = t.p, { tokenizers: h } = i, r = i.stateSlot(
|
|
758
|
-
t.state,
|
|
759
|
-
3
|
|
760
|
-
/* ParseState.TokenizerMask */
|
|
761
|
-
), n = t.curContext ? t.curContext.hash : 0, o = 0;
|
|
762
|
-
for (let a = 0; a < h.length; a++) {
|
|
763
|
-
if ((1 << a & r) == 0)
|
|
764
|
-
continue;
|
|
765
|
-
let u = h[a], f = this.tokens[a];
|
|
766
|
-
if (!(s && !u.fallback) && ((u.contextual || f.start != t.pos || f.mask != r || f.context != n) && (this.updateCachedToken(f, u, t), f.mask = r, f.context = n), f.lookAhead > f.end + 25 && (o = Math.max(f.lookAhead, o)), f.value != 0)) {
|
|
767
|
-
let p = e;
|
|
768
|
-
if (f.extended > -1 && (e = this.addActions(t, f.extended, f.end, e)), e = this.addActions(t, f.value, f.end, e), !u.extend && (s = f, e > p))
|
|
769
|
-
break;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
for (; this.actions.length > e; )
|
|
773
|
-
this.actions.pop();
|
|
774
|
-
return o && t.setLookAhead(o), !s && t.pos == this.stream.end && (s = new P(), s.value = t.p.parser.eofTerm, s.start = s.end = t.pos, e = this.addActions(t, s.value, s.end, e)), this.mainToken = s, this.actions;
|
|
775
|
-
}
|
|
776
|
-
getMainToken(t) {
|
|
777
|
-
if (this.mainToken)
|
|
778
|
-
return this.mainToken;
|
|
779
|
-
let e = new P(), { pos: s, p: i } = t;
|
|
780
|
-
return e.start = s, e.end = Math.min(s + 1, i.stream.end), e.value = s == i.stream.end ? i.parser.eofTerm : 0, e;
|
|
781
|
-
}
|
|
782
|
-
updateCachedToken(t, e, s) {
|
|
783
|
-
let i = this.stream.clipPos(s.pos);
|
|
784
|
-
if (e.token(this.stream.reset(i, t), s), t.value > -1) {
|
|
785
|
-
let { parser: h } = s.p;
|
|
786
|
-
for (let r = 0; r < h.specialized.length; r++)
|
|
787
|
-
if (h.specialized[r] == t.value) {
|
|
788
|
-
let n = h.specializers[r](this.stream.read(t.start, t.end), s);
|
|
789
|
-
if (n >= 0 && s.p.parser.dialect.allows(n >> 1)) {
|
|
790
|
-
(n & 1) == 0 ? t.value = n >> 1 : t.extended = n >> 1;
|
|
791
|
-
break;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
} else
|
|
795
|
-
t.value = 0, t.end = this.stream.clipPos(i + 1);
|
|
796
|
-
}
|
|
797
|
-
putAction(t, e, s, i) {
|
|
798
|
-
for (let h = 0; h < i; h += 3)
|
|
799
|
-
if (this.actions[h] == t)
|
|
800
|
-
return i;
|
|
801
|
-
return this.actions[i++] = t, this.actions[i++] = e, this.actions[i++] = s, i;
|
|
802
|
-
}
|
|
803
|
-
addActions(t, e, s, i) {
|
|
804
|
-
let { state: h } = t, { parser: r } = t.p, { data: n } = r;
|
|
805
|
-
for (let o = 0; o < 2; o++)
|
|
806
|
-
for (let a = r.stateSlot(
|
|
807
|
-
h,
|
|
808
|
-
o ? 2 : 1
|
|
809
|
-
/* ParseState.Actions */
|
|
810
|
-
); ; a += 3) {
|
|
811
|
-
if (n[a] == 65535)
|
|
812
|
-
if (n[a + 1] == 1)
|
|
813
|
-
a = k(n, a + 2);
|
|
814
|
-
else {
|
|
815
|
-
i == 0 && n[a + 1] == 2 && (i = this.putAction(k(n, a + 2), e, s, i));
|
|
816
|
-
break;
|
|
817
|
-
}
|
|
818
|
-
n[a] == e && (i = this.putAction(k(n, a + 1), e, s, i));
|
|
819
|
-
}
|
|
820
|
-
return i;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
class K {
|
|
824
|
-
constructor(t, e, s, i) {
|
|
825
|
-
this.parser = t, this.input = e, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new U(e, i), this.tokens = new J(t, this.stream), this.topTerm = t.top[1];
|
|
826
|
-
let { from: h } = i[0];
|
|
827
|
-
this.stacks = [v.start(this, t.top[0], h)], this.fragments = s.length && this.stream.end - h > t.bufferLength * 4 ? new q(s, t.nodeSet) : null;
|
|
828
|
-
}
|
|
829
|
-
get parsedPos() {
|
|
830
|
-
return this.minStackPos;
|
|
831
|
-
}
|
|
832
|
-
// Move the parser forward. This will process all parse stacks at
|
|
833
|
-
// `this.pos` and try to advance them to a further position. If no
|
|
834
|
-
// stack for such a position is found, it'll start error-recovery.
|
|
835
|
-
//
|
|
836
|
-
// When the parse is finished, this will return a syntax tree. When
|
|
837
|
-
// not, it returns `null`.
|
|
838
|
-
advance() {
|
|
839
|
-
let t = this.stacks, e = this.minStackPos, s = this.stacks = [], i, h;
|
|
840
|
-
if (this.bigReductionCount > 300 && t.length == 1) {
|
|
841
|
-
let [r] = t;
|
|
842
|
-
for (; r.forceReduce() && r.stack.length && r.stack[r.stack.length - 2] >= this.lastBigReductionStart; )
|
|
843
|
-
;
|
|
844
|
-
this.bigReductionCount = this.lastBigReductionSize = 0;
|
|
845
|
-
}
|
|
846
|
-
for (let r = 0; r < t.length; r++) {
|
|
847
|
-
let n = t[r];
|
|
848
|
-
for (; ; ) {
|
|
849
|
-
if (this.tokens.mainToken = null, n.pos > e)
|
|
850
|
-
s.push(n);
|
|
851
|
-
else {
|
|
852
|
-
if (this.advanceStack(n, s, t))
|
|
853
|
-
continue;
|
|
854
|
-
{
|
|
855
|
-
i || (i = [], h = []), i.push(n);
|
|
856
|
-
let o = this.tokens.getMainToken(n);
|
|
857
|
-
h.push(o.value, o.end);
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
break;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
if (!s.length) {
|
|
864
|
-
let r = i && V(i);
|
|
865
|
-
if (r)
|
|
866
|
-
return g && console.log("Finish with " + this.stackID(r)), this.stackToTree(r);
|
|
867
|
-
if (this.parser.strict)
|
|
868
|
-
throw g && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + e);
|
|
869
|
-
this.recovering || (this.recovering = 5);
|
|
870
|
-
}
|
|
871
|
-
if (this.recovering && i) {
|
|
872
|
-
let r = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, h, s);
|
|
873
|
-
if (r)
|
|
874
|
-
return g && console.log("Force-finish " + this.stackID(r)), this.stackToTree(r.forceAll());
|
|
875
|
-
}
|
|
876
|
-
if (this.recovering) {
|
|
877
|
-
let r = this.recovering == 1 ? 1 : this.recovering * 3;
|
|
878
|
-
if (s.length > r)
|
|
879
|
-
for (s.sort((n, o) => o.score - n.score); s.length > r; )
|
|
880
|
-
s.pop();
|
|
881
|
-
s.some((n) => n.reducePos > e) && this.recovering--;
|
|
882
|
-
} else if (s.length > 1) {
|
|
883
|
-
t: for (let r = 0; r < s.length - 1; r++) {
|
|
884
|
-
let n = s[r];
|
|
885
|
-
for (let o = r + 1; o < s.length; o++) {
|
|
886
|
-
let a = s[o];
|
|
887
|
-
if (n.sameState(a) || n.buffer.length > 500 && a.buffer.length > 500)
|
|
888
|
-
if ((n.score - a.score || n.buffer.length - a.buffer.length) > 0)
|
|
889
|
-
s.splice(o--, 1);
|
|
890
|
-
else {
|
|
891
|
-
s.splice(r--, 1);
|
|
892
|
-
continue t;
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
s.length > 12 && s.splice(
|
|
897
|
-
12,
|
|
898
|
-
s.length - 12
|
|
899
|
-
/* Rec.MaxStackCount */
|
|
900
|
-
);
|
|
901
|
-
}
|
|
902
|
-
this.minStackPos = s[0].pos;
|
|
903
|
-
for (let r = 1; r < s.length; r++)
|
|
904
|
-
s[r].pos < this.minStackPos && (this.minStackPos = s[r].pos);
|
|
905
|
-
return null;
|
|
906
|
-
}
|
|
907
|
-
stopAt(t) {
|
|
908
|
-
if (this.stoppedAt != null && this.stoppedAt < t)
|
|
909
|
-
throw new RangeError("Can't move stoppedAt forward");
|
|
910
|
-
this.stoppedAt = t;
|
|
911
|
-
}
|
|
912
|
-
// Returns an updated version of the given stack, or null if the
|
|
913
|
-
// stack can't advance normally. When `split` and `stacks` are
|
|
914
|
-
// given, stacks split off by ambiguous operations will be pushed to
|
|
915
|
-
// `split`, or added to `stacks` if they move `pos` forward.
|
|
916
|
-
advanceStack(t, e, s) {
|
|
917
|
-
let i = t.pos, { parser: h } = this, r = g ? this.stackID(t) + " -> " : "";
|
|
918
|
-
if (this.stoppedAt != null && i > this.stoppedAt)
|
|
919
|
-
return t.forceReduce() ? t : null;
|
|
920
|
-
if (this.fragments) {
|
|
921
|
-
let a = t.curContext && t.curContext.tracker.strict, u = a ? t.curContext.hash : 0;
|
|
922
|
-
for (let f = this.fragments.nodeAt(i); f; ) {
|
|
923
|
-
let p = this.parser.nodeSet.types[f.type.id] == f.type ? h.getGoto(t.state, f.type.id) : -1;
|
|
924
|
-
if (p > -1 && f.length && (!a || (f.prop(y.contextHash) || 0) == u))
|
|
925
|
-
return t.useNode(f, p), g && console.log(r + this.stackID(t) + ` (via reuse of ${h.getName(f.type.id)})`), !0;
|
|
926
|
-
if (!(f instanceof S) || f.children.length == 0 || f.positions[0] > 0)
|
|
927
|
-
break;
|
|
928
|
-
let c = f.children[0];
|
|
929
|
-
if (c instanceof S && f.positions[0] == 0)
|
|
930
|
-
f = c;
|
|
931
|
-
else
|
|
932
|
-
break;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
let n = h.stateSlot(
|
|
936
|
-
t.state,
|
|
937
|
-
4
|
|
938
|
-
/* ParseState.DefaultReduce */
|
|
939
|
-
);
|
|
940
|
-
if (n > 0)
|
|
941
|
-
return t.reduce(n), g && console.log(r + this.stackID(t) + ` (via always-reduce ${h.getName(
|
|
942
|
-
n & 65535
|
|
943
|
-
/* Action.ValueMask */
|
|
944
|
-
)})`), !0;
|
|
945
|
-
if (t.stack.length >= 8400)
|
|
946
|
-
for (; t.stack.length > 6e3 && t.forceReduce(); )
|
|
947
|
-
;
|
|
948
|
-
let o = this.tokens.getActions(t);
|
|
949
|
-
for (let a = 0; a < o.length; ) {
|
|
950
|
-
let u = o[a++], f = o[a++], p = o[a++], c = a == o.length || !s, d = c ? t : t.split(), b = this.tokens.mainToken;
|
|
951
|
-
if (d.apply(u, f, b ? b.start : d.pos, p), g && console.log(r + this.stackID(d) + ` (via ${(u & 65536) == 0 ? "shift" : `reduce of ${h.getName(
|
|
952
|
-
u & 65535
|
|
953
|
-
/* Action.ValueMask */
|
|
954
|
-
)}`} for ${h.getName(f)} @ ${i}${d == t ? "" : ", split"})`), c)
|
|
955
|
-
return !0;
|
|
956
|
-
d.pos > i ? e.push(d) : s.push(d);
|
|
957
|
-
}
|
|
958
|
-
return !1;
|
|
959
|
-
}
|
|
960
|
-
// Advance a given stack forward as far as it will go. Returns the
|
|
961
|
-
// (possibly updated) stack if it got stuck, or null if it moved
|
|
962
|
-
// forward and was given to `pushStackDedup`.
|
|
963
|
-
advanceFully(t, e) {
|
|
964
|
-
let s = t.pos;
|
|
965
|
-
for (; ; ) {
|
|
966
|
-
if (!this.advanceStack(t, null, null))
|
|
967
|
-
return !1;
|
|
968
|
-
if (t.pos > s)
|
|
969
|
-
return D(t, e), !0;
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
runRecovery(t, e, s) {
|
|
973
|
-
let i = null, h = !1;
|
|
974
|
-
for (let r = 0; r < t.length; r++) {
|
|
975
|
-
let n = t[r], o = e[r << 1], a = e[(r << 1) + 1], u = g ? this.stackID(n) + " -> " : "";
|
|
976
|
-
if (n.deadEnd && (h || (h = !0, n.restart(), g && console.log(u + this.stackID(n) + " (restarted)"), this.advanceFully(n, s))))
|
|
977
|
-
continue;
|
|
978
|
-
let f = n.split(), p = u;
|
|
979
|
-
for (let c = 0; f.forceReduce() && c < 10 && (g && console.log(p + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, s)); c++)
|
|
980
|
-
g && (p = this.stackID(f) + " -> ");
|
|
981
|
-
for (let c of n.recoverByInsert(o))
|
|
982
|
-
g && console.log(u + this.stackID(c) + " (via recover-insert)"), this.advanceFully(c, s);
|
|
983
|
-
this.stream.end > n.pos ? (a == n.pos && (a++, o = 0), n.recoverByDelete(o, a), g && console.log(u + this.stackID(n) + ` (via recover-delete ${this.parser.getName(o)})`), D(n, s)) : (!i || i.score < n.score) && (i = n);
|
|
984
|
-
}
|
|
985
|
-
return i;
|
|
986
|
-
}
|
|
987
|
-
// Convert the stack's buffer to a syntax tree.
|
|
988
|
-
stackToTree(t) {
|
|
989
|
-
return t.close(), S.build({
|
|
990
|
-
buffer: A.create(t),
|
|
991
|
-
nodeSet: this.parser.nodeSet,
|
|
992
|
-
topID: this.topTerm,
|
|
993
|
-
maxBufferLength: this.parser.bufferLength,
|
|
994
|
-
reused: this.reused,
|
|
995
|
-
start: this.ranges[0].from,
|
|
996
|
-
length: t.pos - this.ranges[0].from,
|
|
997
|
-
minRepeatType: this.parser.minRepeatTerm
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
stackID(t) {
|
|
1001
|
-
let e = (T || (T = /* @__PURE__ */ new WeakMap())).get(t);
|
|
1002
|
-
return e || T.set(t, e = String.fromCodePoint(this.nextStackID++)), e + t;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
function D(l, t) {
|
|
1006
|
-
for (let e = 0; e < t.length; e++) {
|
|
1007
|
-
let s = t[e];
|
|
1008
|
-
if (s.pos == l.pos && s.sameState(l)) {
|
|
1009
|
-
t[e].score < l.score && (t[e] = l);
|
|
1010
|
-
return;
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
t.push(l);
|
|
1014
|
-
}
|
|
1015
|
-
class Q {
|
|
1016
|
-
constructor(t, e, s) {
|
|
1017
|
-
this.source = t, this.flags = e, this.disabled = s;
|
|
1018
|
-
}
|
|
1019
|
-
allows(t) {
|
|
1020
|
-
return !this.disabled || this.disabled[t] == 0;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
const C = (l) => l;
|
|
1024
|
-
class Z {
|
|
1025
|
-
/**
|
|
1026
|
-
Define a context tracker.
|
|
1027
|
-
*/
|
|
1028
|
-
constructor(t) {
|
|
1029
|
-
this.start = t.start, this.shift = t.shift || C, this.reduce = t.reduce || C, this.reuse = t.reuse || C, this.hash = t.hash || (() => 0), this.strict = t.strict !== !1;
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
class w extends L {
|
|
1033
|
-
/**
|
|
1034
|
-
@internal
|
|
1035
|
-
*/
|
|
1036
|
-
constructor(t) {
|
|
1037
|
-
if (super(), this.wrappers = [], t.version != 14)
|
|
1038
|
-
throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);
|
|
1039
|
-
let e = t.nodeNames.split(" ");
|
|
1040
|
-
this.minRepeatTerm = e.length;
|
|
1041
|
-
for (let n = 0; n < t.repeatNodeCount; n++)
|
|
1042
|
-
e.push("");
|
|
1043
|
-
let s = Object.keys(t.topRules).map((n) => t.topRules[n][1]), i = [];
|
|
1044
|
-
for (let n = 0; n < e.length; n++)
|
|
1045
|
-
i.push([]);
|
|
1046
|
-
function h(n, o, a) {
|
|
1047
|
-
i[n].push([o, o.deserialize(String(a))]);
|
|
1048
|
-
}
|
|
1049
|
-
if (t.nodeProps)
|
|
1050
|
-
for (let n of t.nodeProps) {
|
|
1051
|
-
let o = n[0];
|
|
1052
|
-
typeof o == "string" && (o = y[o]);
|
|
1053
|
-
for (let a = 1; a < n.length; ) {
|
|
1054
|
-
let u = n[a++];
|
|
1055
|
-
if (u >= 0)
|
|
1056
|
-
h(u, o, n[a++]);
|
|
1057
|
-
else {
|
|
1058
|
-
let f = n[a + -u];
|
|
1059
|
-
for (let p = -u; p > 0; p--)
|
|
1060
|
-
h(n[a++], o, f);
|
|
1061
|
-
a++;
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
this.nodeSet = new M(e.map((n, o) => $.define({
|
|
1066
|
-
name: o >= this.minRepeatTerm ? void 0 : n,
|
|
1067
|
-
id: o,
|
|
1068
|
-
props: i[o],
|
|
1069
|
-
top: s.indexOf(o) > -1,
|
|
1070
|
-
error: o == 0,
|
|
1071
|
-
skipped: t.skippedNodes && t.skippedNodes.indexOf(o) > -1
|
|
1072
|
-
}))), t.propSources && (this.nodeSet = this.nodeSet.extend(...t.propSources)), this.strict = !1, this.bufferLength = E;
|
|
1073
|
-
let r = x(t.tokenData);
|
|
1074
|
-
this.context = t.context, this.specializerSpecs = t.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
|
|
1075
|
-
for (let n = 0; n < this.specializerSpecs.length; n++)
|
|
1076
|
-
this.specialized[n] = this.specializerSpecs[n].term;
|
|
1077
|
-
this.specializers = this.specializerSpecs.map(B), this.states = x(t.states, Uint32Array), this.data = x(t.stateData), this.goto = x(t.goto), this.maxTerm = t.maxTerm, this.tokenizers = t.tokenizers.map((n) => typeof n == "number" ? new m(r, n) : n), this.topRules = t.topRules, this.dialects = t.dialects || {}, this.dynamicPrecedences = t.dynamicPrecedences || null, this.tokenPrecTable = t.tokenPrec, this.termNames = t.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
|
|
1078
|
-
}
|
|
1079
|
-
createParse(t, e, s) {
|
|
1080
|
-
let i = new K(this, t, e, s);
|
|
1081
|
-
for (let h of this.wrappers)
|
|
1082
|
-
i = h(i, t, e, s);
|
|
1083
|
-
return i;
|
|
1084
|
-
}
|
|
1085
|
-
/**
|
|
1086
|
-
Get a goto table entry @internal
|
|
1087
|
-
*/
|
|
1088
|
-
getGoto(t, e, s = !1) {
|
|
1089
|
-
let i = this.goto;
|
|
1090
|
-
if (e >= i[0])
|
|
1091
|
-
return -1;
|
|
1092
|
-
for (let h = i[e + 1]; ; ) {
|
|
1093
|
-
let r = i[h++], n = r & 1, o = i[h++];
|
|
1094
|
-
if (n && s)
|
|
1095
|
-
return o;
|
|
1096
|
-
for (let a = h + (r >> 1); h < a; h++)
|
|
1097
|
-
if (i[h] == t)
|
|
1098
|
-
return o;
|
|
1099
|
-
if (n)
|
|
1100
|
-
return -1;
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
/**
|
|
1104
|
-
Check if this state has an action for a given terminal @internal
|
|
1105
|
-
*/
|
|
1106
|
-
hasAction(t, e) {
|
|
1107
|
-
let s = this.data;
|
|
1108
|
-
for (let i = 0; i < 2; i++)
|
|
1109
|
-
for (let h = this.stateSlot(
|
|
1110
|
-
t,
|
|
1111
|
-
i ? 2 : 1
|
|
1112
|
-
/* ParseState.Actions */
|
|
1113
|
-
), r; ; h += 3) {
|
|
1114
|
-
if ((r = s[h]) == 65535)
|
|
1115
|
-
if (s[h + 1] == 1)
|
|
1116
|
-
r = s[h = k(s, h + 2)];
|
|
1117
|
-
else {
|
|
1118
|
-
if (s[h + 1] == 2)
|
|
1119
|
-
return k(s, h + 2);
|
|
1120
|
-
break;
|
|
1121
|
-
}
|
|
1122
|
-
if (r == e || r == 0)
|
|
1123
|
-
return k(s, h + 1);
|
|
1124
|
-
}
|
|
1125
|
-
return 0;
|
|
1126
|
-
}
|
|
1127
|
-
/**
|
|
1128
|
-
@internal
|
|
1129
|
-
*/
|
|
1130
|
-
stateSlot(t, e) {
|
|
1131
|
-
return this.states[t * 6 + e];
|
|
1132
|
-
}
|
|
1133
|
-
/**
|
|
1134
|
-
@internal
|
|
1135
|
-
*/
|
|
1136
|
-
stateFlag(t, e) {
|
|
1137
|
-
return (this.stateSlot(
|
|
1138
|
-
t,
|
|
1139
|
-
0
|
|
1140
|
-
/* ParseState.Flags */
|
|
1141
|
-
) & e) > 0;
|
|
1142
|
-
}
|
|
1143
|
-
/**
|
|
1144
|
-
@internal
|
|
1145
|
-
*/
|
|
1146
|
-
validAction(t, e) {
|
|
1147
|
-
return !!this.allActions(t, (s) => s == e ? !0 : null);
|
|
1148
|
-
}
|
|
1149
|
-
/**
|
|
1150
|
-
@internal
|
|
1151
|
-
*/
|
|
1152
|
-
allActions(t, e) {
|
|
1153
|
-
let s = this.stateSlot(
|
|
1154
|
-
t,
|
|
1155
|
-
4
|
|
1156
|
-
/* ParseState.DefaultReduce */
|
|
1157
|
-
), i = s ? e(s) : void 0;
|
|
1158
|
-
for (let h = this.stateSlot(
|
|
1159
|
-
t,
|
|
1160
|
-
1
|
|
1161
|
-
/* ParseState.Actions */
|
|
1162
|
-
); i == null; h += 3) {
|
|
1163
|
-
if (this.data[h] == 65535)
|
|
1164
|
-
if (this.data[h + 1] == 1)
|
|
1165
|
-
h = k(this.data, h + 2);
|
|
1166
|
-
else
|
|
1167
|
-
break;
|
|
1168
|
-
i = e(k(this.data, h + 1));
|
|
1169
|
-
}
|
|
1170
|
-
return i;
|
|
1171
|
-
}
|
|
1172
|
-
/**
|
|
1173
|
-
Get the states that can follow this one through shift actions or
|
|
1174
|
-
goto jumps. @internal
|
|
1175
|
-
*/
|
|
1176
|
-
nextStates(t) {
|
|
1177
|
-
let e = [];
|
|
1178
|
-
for (let s = this.stateSlot(
|
|
1179
|
-
t,
|
|
1180
|
-
1
|
|
1181
|
-
/* ParseState.Actions */
|
|
1182
|
-
); ; s += 3) {
|
|
1183
|
-
if (this.data[s] == 65535)
|
|
1184
|
-
if (this.data[s + 1] == 1)
|
|
1185
|
-
s = k(this.data, s + 2);
|
|
1186
|
-
else
|
|
1187
|
-
break;
|
|
1188
|
-
if ((this.data[s + 2] & 1) == 0) {
|
|
1189
|
-
let i = this.data[s + 1];
|
|
1190
|
-
e.some((h, r) => r & 1 && h == i) || e.push(this.data[s], i);
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
return e;
|
|
1194
|
-
}
|
|
1195
|
-
/**
|
|
1196
|
-
Configure the parser. Returns a new parser instance that has the
|
|
1197
|
-
given settings modified. Settings not provided in `config` are
|
|
1198
|
-
kept from the original parser.
|
|
1199
|
-
*/
|
|
1200
|
-
configure(t) {
|
|
1201
|
-
let e = Object.assign(Object.create(w.prototype), this);
|
|
1202
|
-
if (t.props && (e.nodeSet = this.nodeSet.extend(...t.props)), t.top) {
|
|
1203
|
-
let s = this.topRules[t.top];
|
|
1204
|
-
if (!s)
|
|
1205
|
-
throw new RangeError(`Invalid top rule name ${t.top}`);
|
|
1206
|
-
e.top = s;
|
|
1207
|
-
}
|
|
1208
|
-
return t.tokenizers && (e.tokenizers = this.tokenizers.map((s) => {
|
|
1209
|
-
let i = t.tokenizers.find((h) => h.from == s);
|
|
1210
|
-
return i ? i.to : s;
|
|
1211
|
-
})), t.specializers && (e.specializers = this.specializers.slice(), e.specializerSpecs = this.specializerSpecs.map((s, i) => {
|
|
1212
|
-
let h = t.specializers.find((n) => n.from == s.external);
|
|
1213
|
-
if (!h)
|
|
1214
|
-
return s;
|
|
1215
|
-
let r = Object.assign(Object.assign({}, s), { external: h.to });
|
|
1216
|
-
return e.specializers[i] = B(r), r;
|
|
1217
|
-
})), t.contextTracker && (e.context = t.contextTracker), t.dialect && (e.dialect = this.parseDialect(t.dialect)), t.strict != null && (e.strict = t.strict), t.wrap && (e.wrappers = e.wrappers.concat(t.wrap)), t.bufferLength != null && (e.bufferLength = t.bufferLength), e;
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
|
|
1221
|
-
are registered for this parser.
|
|
1222
|
-
*/
|
|
1223
|
-
hasWrappers() {
|
|
1224
|
-
return this.wrappers.length > 0;
|
|
1225
|
-
}
|
|
1226
|
-
/**
|
|
1227
|
-
Returns the name associated with a given term. This will only
|
|
1228
|
-
work for all terms when the parser was generated with the
|
|
1229
|
-
`--names` option. By default, only the names of tagged terms are
|
|
1230
|
-
stored.
|
|
1231
|
-
*/
|
|
1232
|
-
getName(t) {
|
|
1233
|
-
return this.termNames ? this.termNames[t] : String(t <= this.maxNode && this.nodeSet.types[t].name || t);
|
|
1234
|
-
}
|
|
1235
|
-
/**
|
|
1236
|
-
The eof term id is always allocated directly after the node
|
|
1237
|
-
types. @internal
|
|
1238
|
-
*/
|
|
1239
|
-
get eofTerm() {
|
|
1240
|
-
return this.maxNode + 1;
|
|
1241
|
-
}
|
|
1242
|
-
/**
|
|
1243
|
-
The type of top node produced by the parser.
|
|
1244
|
-
*/
|
|
1245
|
-
get topNode() {
|
|
1246
|
-
return this.nodeSet.types[this.top[1]];
|
|
1247
|
-
}
|
|
1248
|
-
/**
|
|
1249
|
-
@internal
|
|
1250
|
-
*/
|
|
1251
|
-
dynamicPrecedence(t) {
|
|
1252
|
-
let e = this.dynamicPrecedences;
|
|
1253
|
-
return e == null ? 0 : e[t] || 0;
|
|
1254
|
-
}
|
|
1255
|
-
/**
|
|
1256
|
-
@internal
|
|
1257
|
-
*/
|
|
1258
|
-
parseDialect(t) {
|
|
1259
|
-
let e = Object.keys(this.dialects), s = e.map(() => !1);
|
|
1260
|
-
if (t)
|
|
1261
|
-
for (let h of t.split(" ")) {
|
|
1262
|
-
let r = e.indexOf(h);
|
|
1263
|
-
r >= 0 && (s[r] = !0);
|
|
1264
|
-
}
|
|
1265
|
-
let i = null;
|
|
1266
|
-
for (let h = 0; h < e.length; h++)
|
|
1267
|
-
if (!s[h])
|
|
1268
|
-
for (let r = this.dialects[e[h]], n; (n = this.data[r++]) != 65535; )
|
|
1269
|
-
(i || (i = new Uint8Array(this.maxTerm + 1)))[n] = 1;
|
|
1270
|
-
return new Q(t, s, i);
|
|
1271
|
-
}
|
|
1272
|
-
/**
|
|
1273
|
-
Used by the output of the parser generator. Not available to
|
|
1274
|
-
user code. @hide
|
|
1275
|
-
*/
|
|
1276
|
-
static deserialize(t) {
|
|
1277
|
-
return new w(t);
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
function k(l, t) {
|
|
1281
|
-
return l[t] | l[t + 1] << 16;
|
|
1282
|
-
}
|
|
1283
|
-
function V(l) {
|
|
1284
|
-
let t = null;
|
|
1285
|
-
for (let e of l) {
|
|
1286
|
-
let s = e.p.stoppedAt;
|
|
1287
|
-
(e.pos == e.p.stream.end || s != null && e.pos > s) && e.p.parser.stateFlag(
|
|
1288
|
-
e.state,
|
|
1289
|
-
2
|
|
1290
|
-
/* StateFlag.Accepting */
|
|
1291
|
-
) && (!t || t.score < e.score) && (t = e);
|
|
1292
|
-
}
|
|
1293
|
-
return t;
|
|
1294
|
-
}
|
|
1295
|
-
function B(l) {
|
|
1296
|
-
if (l.external) {
|
|
1297
|
-
let t = l.extend ? 1 : 0;
|
|
1298
|
-
return (e, s) => l.external(e, s) << 1 | t;
|
|
1299
|
-
}
|
|
1300
|
-
return l.get;
|
|
1301
|
-
}
|
|
1302
|
-
export {
|
|
1303
|
-
Z as C,
|
|
1304
|
-
Y as E,
|
|
1305
|
-
w as L,
|
|
1306
|
-
H as a
|
|
1307
|
-
};
|