diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f86e3b..f7c95fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +# [0.4.0](https://github.com/ikatyang/tree-sitter-markdown/compare/v0.3.1...v0.4.0) (2020-05-24) + + +### Chores + +* **deps:** upgrade to tree-sitter@0.16.7 ([43b1134](https://github.com/ikatyang/tree-sitter-markdown/commit/43b1134e9571331a5b28b527ea5aec06991f38e2)) + + +### Features + +* support super long words ([3d67064](https://github.com/ikatyang/tree-sitter-markdown/commit/3d67064f2d98e1ffac9cf9a675634453404785e9)) + + + ## [0.3.1](https://github.com/ikatyang/tree-sitter-markdown/compare/v0.3.0...v0.3.1) (2020-04-26) diff --git a/docs/assets/tree-sitter-markdown-0.3.1/tree-sitter-markdown.wasm b/docs/assets/tree-sitter-markdown-0.4.0/tree-sitter-markdown.wasm similarity index 83% rename from docs/assets/tree-sitter-markdown-0.3.1/tree-sitter-markdown.wasm rename to docs/assets/tree-sitter-markdown-0.4.0/tree-sitter-markdown.wasm index 800f5e7..2b8443b 100644 Binary files a/docs/assets/tree-sitter-markdown-0.3.1/tree-sitter-markdown.wasm and b/docs/assets/tree-sitter-markdown-0.4.0/tree-sitter-markdown.wasm differ diff --git a/docs/assets/tree-sitter-playground-0.15.10/LICENSE b/docs/assets/tree-sitter-playground-0.16.7/LICENSE similarity index 100% rename from docs/assets/tree-sitter-playground-0.15.10/LICENSE rename to docs/assets/tree-sitter-playground-0.16.7/LICENSE diff --git a/docs/assets/tree-sitter-playground-0.15.10/playground.js b/docs/assets/tree-sitter-playground-0.16.7/playground.js similarity index 100% rename from docs/assets/tree-sitter-playground-0.15.10/playground.js rename to docs/assets/tree-sitter-playground-0.16.7/playground.js diff --git a/docs/assets/tree-sitter-playground-0.15.10/style.css b/docs/assets/tree-sitter-playground-0.16.7/style.css similarity index 79% rename from docs/assets/tree-sitter-playground-0.15.10/style.css rename to docs/assets/tree-sitter-playground-0.16.7/style.css index 5b8e210..6e37df6 100644 --- a/docs/assets/tree-sitter-playground-0.15.10/style.css +++ b/docs/assets/tree-sitter-playground-0.16.7/style.css @@ -1 +1 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.highlight table td{padding:5px}.highlight table pre{margin:0}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .c,.highlight .cd{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .ge{color:#000000;font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{color:#000000;font-weight:bold}.highlight .kd{color:#000000;font-weight:bold}.highlight .kn{color:#000000;font-weight:bold}.highlight .kp{color:#000000;font-weight:bold}.highlight .kr{color:#000000;font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .k,.highlight .kv{color:#000000;font-weight:bold}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .il{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .m,.highlight .mb,.highlight .mx{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .bp{color:#999999}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .nd{color:#3c5d5d;font-weight:bold}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nl{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .nv{color:#008080}.highlight .ow{color:#000000;font-weight:bold}.highlight .o{color:#000000;font-weight:bold}.highlight .w{color:#bbbbbb}.highlight{background-color:#f8f8f8}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.btn{display:inline-block;margin-bottom:1rem;color:rgba(255,255,255,0.7);background-color:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.2);border-style:solid;border-width:1px;border-radius:0.3rem;transition:color 0.2s, background-color 0.2s, border-color 0.2s}.btn:hover{color:rgba(255,255,255,0.8);text-decoration:none;background-color:rgba(255,255,255,0.2);border-color:rgba(255,255,255,0.3)}.btn+.btn{margin-left:1rem}@media screen and (min-width: 64em){.btn{padding:0.75rem 1rem}}@media screen and (min-width: 42em) and (max-width: 64em){.btn{padding:0.6rem 0.9rem;font-size:0.9rem}}@media screen and (max-width: 42em){.btn{display:block;width:100%;padding:0.75rem;font-size:0.9rem}.btn+.btn{margin-top:1rem;margin-left:0}}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg, #155799, #159957)}@media screen and (min-width: 64em){.page-header{padding:5rem 6rem}}@media screen and (min-width: 42em) and (max-width: 64em){.page-header{padding:3rem 4rem}}@media screen and (max-width: 42em){.page-header{padding:2rem 1rem}}.project-name{margin-top:0;margin-bottom:0.1rem}@media screen and (min-width: 64em){.project-name{font-size:3.25rem}}@media screen and (min-width: 42em) and (max-width: 64em){.project-name{font-size:2.25rem}}@media screen and (max-width: 42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:normal;opacity:0.7}@media screen and (min-width: 64em){.project-tagline{font-size:1.25rem}}@media screen and (min-width: 42em) and (max-width: 64em){.project-tagline{font-size:1.15rem}}@media screen and (max-width: 42em){.project-tagline{font-size:1rem}}.main-content{word-wrap:break-word}.main-content :first-child{margin-top:0}@media screen and (min-width: 64em){.main-content{max-width:64rem;padding:2rem 6rem;margin:0 auto;font-size:1.1rem}}@media screen and (min-width: 42em) and (max-width: 64em){.main-content{padding:2rem 4rem;font-size:1.1rem}}@media screen and (max-width: 42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:normal;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas, "Liberation Mono", Menlo, Courier, monospace;font-size:0.9rem;color:#567482;background-color:#f3f6fa;border-radius:0.3rem}.main-content pre{padding:0.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas, "Liberation Mono", Menlo, Courier, monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:0.3rem}.main-content pre>code{padding:0;margin:0;font-size:0.9rem;color:#567482;word-break:normal;white-space:pre;background:transparent;border:0}.main-content .highlight{margin-bottom:1rem}.main-content .highlight pre{margin-bottom:0;word-break:normal}.main-content .highlight pre,.main-content pre{padding:0.8rem;overflow:auto;font-size:0.9rem;line-height:1.45;border-radius:0.3rem;-webkit-overflow-scrolling:touch}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:before,.main-content pre code:after,.main-content pre tt:before,.main-content pre tt:after{content:normal}.main-content ul,.main-content ol{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:0.3rem solid #dce6f0}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}.main-content table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch}.main-content table th{font-weight:bold}.main-content table th,.main-content table td{padding:0.5rem 1rem;border:1px solid #e9ebec}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:bold}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0}.site-footer{padding-top:2rem;margin-top:2rem;border-top:solid 1px #eff0f1}@media screen and (min-width: 64em){.site-footer{font-size:1rem}}@media screen and (min-width: 42em) and (max-width: 64em){.site-footer{font-size:1rem}}@media screen and (max-width: 42em){.site-footer{font-size:0.9rem}}.site-footer-owner{display:block;font-weight:bold}.site-footer-credits{color:#819198}body{overflow:scroll}#container{position:relative;max-width:1024px;margin:0 auto}#main-content,#sidebar{padding:20px 0}#sidebar{position:fixed;background:white;top:0;bottom:0;width:0;overflow-y:auto;border-right:1px solid #ccc;z-index:1}#sidebar-toggle-link{font-size:24px;position:fixed;background-color:white;opacity:0.75;box-shadow:1px 1px 5px #aaa;left:0;padding:5px 10px;display:none;z-index:100;text-decoration:none !important;color:#aaa}#main-content{position:relative;padding:20px;padding-left:20px}.nav-link.active{text-decoration:underline}.table-of-contents-section{border-bottom:1px solid #ccc}.logo{display:block}.table-of-contents-section.active{background-color:#edffcb}.table-of-contents-section{padding:10px 20px}#table-of-contents ul{padding:0;margin:0}#table-of-contents li{display:block;padding:5px 20px}@media (max-width: 900px){#sidebar{left:0;transition:left 0.25s}#sidebar-toggle-link{display:block;transition:left 0.25s}#main-content{left:0;padding-left:20px;transition:left 0.25s}body.sidebar-hidden #sidebar{left:0}body.sidebar-hidden #main-content{left:0}body.sidebar-hidden #sidebar-toggle-link{left:0}}#playground-container .CodeMirror{height:auto;max-height:350px;border:1px solid #aaa}#playground-container .CodeMirror-scroll{height:auto;max-height:350px}#playground-container h4,#playground-container select,#playground-container .field,#playground-container label{display:inline-block;margin-right:20px}#playground-container #logging-checkbox{height:15px}#playground-container .CodeMirror div.CodeMirror-cursor{border-left:3px solid red}#output-container{padding:0 10px;margin:0}#output-container-scroll{padding:0;position:relative;margin-top:0;overflow:auto;max-height:350px;border:1px solid #aaa}a.highlighted{background-color:#ddd;text-decoration:underline}.query-error{text-decoration:underline red dashed} +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.highlight table td{padding:5px}.highlight table pre{margin:0}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .c,.highlight .cd{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .ge{color:#000000;font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{color:#000000;font-weight:bold}.highlight .kd{color:#000000;font-weight:bold}.highlight .kn{color:#000000;font-weight:bold}.highlight .kp{color:#000000;font-weight:bold}.highlight .kr{color:#000000;font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .k,.highlight .kv{color:#000000;font-weight:bold}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .il{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .m,.highlight .mb,.highlight .mx{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .bp{color:#999999}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .nd{color:#3c5d5d;font-weight:bold}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nl{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .nv{color:#008080}.highlight .ow{color:#000000;font-weight:bold}.highlight .o{color:#000000;font-weight:bold}.highlight .w{color:#bbbbbb}.highlight{background-color:#f8f8f8}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.btn{display:inline-block;margin-bottom:1rem;color:rgba(255,255,255,0.7);background-color:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.2);border-style:solid;border-width:1px;border-radius:0.3rem;transition:color 0.2s, background-color 0.2s, border-color 0.2s}.btn:hover{color:rgba(255,255,255,0.8);text-decoration:none;background-color:rgba(255,255,255,0.2);border-color:rgba(255,255,255,0.3)}.btn+.btn{margin-left:1rem}@media screen and (min-width: 64em){.btn{padding:0.75rem 1rem}}@media screen and (min-width: 42em) and (max-width: 64em){.btn{padding:0.6rem 0.9rem;font-size:0.9rem}}@media screen and (max-width: 42em){.btn{display:block;width:100%;padding:0.75rem;font-size:0.9rem}.btn+.btn{margin-top:1rem;margin-left:0}}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg, #155799, #159957)}@media screen and (min-width: 64em){.page-header{padding:5rem 6rem}}@media screen and (min-width: 42em) and (max-width: 64em){.page-header{padding:3rem 4rem}}@media screen and (max-width: 42em){.page-header{padding:2rem 1rem}}.project-name{margin-top:0;margin-bottom:0.1rem}@media screen and (min-width: 64em){.project-name{font-size:3.25rem}}@media screen and (min-width: 42em) and (max-width: 64em){.project-name{font-size:2.25rem}}@media screen and (max-width: 42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:normal;opacity:0.7}@media screen and (min-width: 64em){.project-tagline{font-size:1.25rem}}@media screen and (min-width: 42em) and (max-width: 64em){.project-tagline{font-size:1.15rem}}@media screen and (max-width: 42em){.project-tagline{font-size:1rem}}.main-content{word-wrap:break-word}.main-content :first-child{margin-top:0}@media screen and (min-width: 64em){.main-content{max-width:64rem;padding:2rem 6rem;margin:0 auto;font-size:1.1rem}}@media screen and (min-width: 42em) and (max-width: 64em){.main-content{padding:2rem 4rem;font-size:1.1rem}}@media screen and (max-width: 42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:normal;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas, "Liberation Mono", Menlo, Courier, monospace;font-size:0.9rem;color:#567482;background-color:#f3f6fa;border-radius:0.3rem}.main-content pre{padding:0.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas, "Liberation Mono", Menlo, Courier, monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:0.3rem}.main-content pre>code{padding:0;margin:0;font-size:0.9rem;color:#567482;word-break:normal;white-space:pre;background:transparent;border:0}.main-content .highlight{margin-bottom:1rem}.main-content .highlight pre{margin-bottom:0;word-break:normal}.main-content .highlight pre,.main-content pre{padding:0.8rem;overflow:auto;font-size:0.9rem;line-height:1.45;border-radius:0.3rem;-webkit-overflow-scrolling:touch}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:before,.main-content pre code:after,.main-content pre tt:before,.main-content pre tt:after{content:normal}.main-content ul,.main-content ol{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:0.3rem solid #dce6f0}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}.main-content table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch}.main-content table th{font-weight:bold}.main-content table th,.main-content table td{padding:0.5rem 1rem;border:1px solid #e9ebec}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:bold}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0}.site-footer{padding-top:2rem;margin-top:2rem;border-top:solid 1px #eff0f1}@media screen and (min-width: 64em){.site-footer{font-size:1rem}}@media screen and (min-width: 42em) and (max-width: 64em){.site-footer{font-size:1rem}}@media screen and (max-width: 42em){.site-footer{font-size:0.9rem}}.site-footer-owner{display:block;font-weight:bold}.site-footer-credits{color:#819198}body{overflow:scroll}a[href^="http"]:after{content:"";display:inline-block;transform:translate(0px, 2px);width:.9em;height:.9em;margin-left:3px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23777'%3E%3Cpath d='M20 3h-5a1 1 0 1 0 0 2h3L8 14a1 1 0 1 0 2 2l9-10v3a1 1 0 1 0 2 0V4a1 1 0 0 0-1-1zM5 3L3 5v14l2 2h14l2-2v-6a1 1 0 1 0-2 0v6H5V5h6a1 1 0 1 0 0-2H5z'/%3E%3C/svg%3E");background-size:cover}#container{position:relative;max-width:1024px;margin:0 auto}#main-content,#sidebar{padding:20px 0}#sidebar{position:fixed;background:white;top:0;bottom:0;width:0;overflow-y:auto;border-right:1px solid #ccc;z-index:1}#sidebar .github-repo{display:inline-block;padding-left:3.75em;font-size:.85em}#sidebar-toggle-link{font-size:24px;position:fixed;background-color:white;opacity:0.75;box-shadow:1px 1px 5px #aaa;left:0;padding:5px 10px;display:none;z-index:100;text-decoration:none !important;color:#aaa}#main-content{position:relative;padding:20px;padding-left:20px}.nav-link.active{text-decoration:underline}a>span{text-decoration:inherit}.table-of-contents-section{border-bottom:1px solid #ccc}.logo{display:block}.table-of-contents-section.active{background-color:#edffcb}.table-of-contents-section{padding:10px 20px}#table-of-contents ul{padding:0;margin:0}#table-of-contents li{display:block;padding:5px 20px}@media (max-width: 900px){#sidebar{left:0;transition:left 0.25s}#sidebar-toggle-link{display:block;transition:left 0.25s}#main-content{left:0;padding-left:20px;transition:left 0.25s}body.sidebar-hidden #sidebar{left:0}body.sidebar-hidden #main-content{left:0}body.sidebar-hidden #sidebar-toggle-link{left:0}}#playground-container .CodeMirror{height:auto;max-height:350px;border:1px solid #aaa}#playground-container .CodeMirror-scroll{height:auto;max-height:350px}#playground-container h4,#playground-container select,#playground-container .field,#playground-container label{display:inline-block;margin-right:20px}#playground-container #logging-checkbox{height:15px}#playground-container .CodeMirror div.CodeMirror-cursor{border-left:3px solid red}#output-container{padding:0 10px;margin:0}#output-container-scroll{padding:0;position:relative;margin-top:0;overflow:auto;max-height:350px;border:1px solid #aaa}a.highlighted{background-color:#ddd;text-decoration:underline}.query-error{text-decoration:underline red dashed} diff --git a/docs/assets/web-tree-sitter-0.16.2/tree-sitter.js b/docs/assets/web-tree-sitter-0.16.2/tree-sitter.js deleted file mode 100644 index 4fbe4aa..0000000 --- a/docs/assets/web-tree-sitter-0.16.2/tree-sitter.js +++ /dev/null @@ -1 +0,0 @@ -var Module=void 0!==Module?Module:{};!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.TreeSitter=t()}(0,function(){var e,t={};for(e in Module)Module.hasOwnProperty(e)&&(t[e]=Module[e]);var r,n,o=[],s=function(e,t){throw t},_=!1,a=!1;_="object"==typeof window,a="function"==typeof importScripts,r="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,n=!_&&!r&&!a;var u,i,l,d,c="";r?(c=a?require("path").dirname(c)+"/":__dirname+"/",u=function(e,t){return l||(l=require("fs")),d||(d=require("path")),e=d.normalize(e),l.readFileSync(e,t?null:"utf8")},i=function(e){var t=u(e,!0);return t.buffer||(t=new Uint8Array(t)),q(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),o=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(e){if(!(e instanceof Ze))throw e}),process.on("unhandledRejection",de),s=function(e){process.exit(e)},Module.inspect=function(){return"[Emscripten Module object]"}):n?("undefined"!=typeof read&&(u=function(e){return read(e)}),i=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(q("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),"function"==typeof quit&&(s=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(_||a)&&(a?c=self.location.href:document.currentScript&&(c=document.currentScript.src),c=0!==c.indexOf("blob:")?c.substr(0,c.lastIndexOf("/")+1):"",u=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},a&&(i=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var m=Module.print||console.log.bind(console),f=Module.printErr||console.warn.bind(console);for(e in t)t.hasOwnProperty(e)&&(Module[e]=t[e]);t=null,Module.arguments&&(o=Module.arguments),Module.thisProgram&&Module.thisProgram,Module.quit&&(s=Module.quit);var p=16;function h(e){var t=D[K>>2],r=t+e+15&-16;return r>Ee()&&de(),D[K>>2]=r,t}function w(e,t){return t||(t=p),Math.ceil(e/t)*t}function g(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:if("*"===e[e.length-1])return 4;if("i"===e[0]){var t=parseInt(e.substr(1));return q(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8}return 0}}var M={nextHandle:1,loadedLibs:{"-1":{refcount:1/0,name:"__self__",module:Module,global:!0}},loadedLibNames:{__self__:-1}};function y(e,t){t=t||{global:!0,nodelete:!0};var r,n=M.loadedLibNames[e];if(n)return r=M.loadedLibs[n],t.global&&!r.global&&(r.global=!0,"loading"!==r.module&&a(r.module)),t.nodelete&&r.refcount!==1/0&&(r.refcount=1/0),r.refcount++,t.loadAsync?Promise.resolve(n):n;function o(){if(t.fs){var r=t.fs.readFile(e,{encoding:"binary"});return r instanceof Uint8Array||(r=new Uint8Array(lib_data)),t.loadAsync?Promise.resolve(r):r}return t.loadAsync?(n=e,fetch(n,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load binary file at '"+n+"'";return e.arrayBuffer()}).then(function(e){return new Uint8Array(e)})):i(e);var n}function s(e){return E(e,t)}function _(){if(void 0!==Module.preloadedWasm&&void 0!==Module.preloadedWasm[e]){var r=Module.preloadedWasm[e];return t.loadAsync?Promise.resolve(r):r}return t.loadAsync?o().then(function(e){return s(e)}):s(o())}function a(e){for(var t in e)if(e.hasOwnProperty(t)){var r;r="_"+t,Module.hasOwnProperty(r)||(Module[r]=e[t])}}function u(e){r.global&&a(e),r.module=e}return n=M.nextHandle++,r={refcount:t.nodelete?1/0:1,name:e,module:"loading",global:t.global},M.loadedLibNames[e]=n,M.loadedLibs[n]=r,t.loadAsync?_().then(function(e){return u(e),n}):(u(_()),n)}function b(e,t,r,n){var o={};for(var s in e){var _=e[s];"object"==typeof _&&(_=_.value),"number"==typeof _&&(_+=t),o[s]=_,n&&(n["_"+s]=_)}return o}function E(e,t){q(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0],"need to see wasm magic number"),q(0===e[8],"need the dylink section to be first");var r=9;function n(){for(var t=0,n=1;;){var o=e[r++];if(t+=(127&o)*n,n*=128,!(128&o))break}return t}n();q(6===e[r]),q(e[++r]==="d".charCodeAt(0)),q(e[++r]==="y".charCodeAt(0)),q(e[++r]==="l".charCodeAt(0)),q(e[++r]==="i".charCodeAt(0)),q(e[++r]==="n".charCodeAt(0)),q(e[++r]==="k".charCodeAt(0)),r++;for(var o=n(),s=n(),_=n(),a=n(),u=n(),i=[],l=0;l=0,a=0;return e[t]=function(){if(!a){var e=m(n,0,_);a=I(e,s)}return a}}return t.startsWith("invoke_")?e[t]=We:e[t]=function(){return m(t).apply(null,arguments)}}}),g={global:{NaN:NaN,Infinity:1/0},"global.Math":Math,env:h,wasi_snapshot_preview1:h};function M(e,t){var n=b(e.exports,r,0,t),o=n.__post_instantiate;return o&&(ee?o():Q.push(o)),n}return t.loadAsync?WebAssembly.instantiate(e,g).then(function(e){return M(e.instance,c)}):M(new WebAssembly.Instance(new WebAssembly.Module(e),g),c)}return t.loadAsync?Promise.all(i.map(function(e){return y(e,t)})).then(function(){return f()}):(i.forEach(function(e){y(e,t)}),f())}function v(e,t){var r=R,n=r.length;try{r.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."}try{r.set(n,e)}catch(s){if(!(s instanceof TypeError))throw s;q(void 0!==t,"Missing signature argument to addFunction");var o=function(e,t){if("function"==typeof WebAssembly.Function){for(var r={i:"i32",j:"i64",f:"f32",d:"f64"},n={parameters:[],results:"v"==t[0]?[]:[r[t[0]]]},o=1;o>0]=t;break;case"i16":j[e>>1]=t;break;case"i32":D[e>>2]=t;break;case"i64":he=[t>>>0,(pe=t,+re(pe)>=1?pe>0?(0|se(+oe(pe/4294967296),4294967295))>>>0:~~+ne((pe-+(~~pe>>>0))/4294967296)>>>0:0)],D[e>>2]=he[0],D[e+4>>2]=he[1];break;case"float":B[e>>2]=t;break;case"double":H[e>>3]=t;break;default:de("invalid type for setValue: "+r)}}function P(e,t,r){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return O[e>>0];case"i16":return j[e>>1];case"i32":case"i64":return D[e>>2];case"float":return B[e>>2];case"double":return H[e>>3];default:de("invalid type for getValue: "+t)}return null}A=w(A,1),Module.wasmBinary&&(S=Module.wasmBinary),Module.noExitRuntime&&(N=Module.noExitRuntime),"object"!=typeof WebAssembly&&f("no native wasm support detected");var R=new WebAssembly.Table({initial:12,element:"anyfunc"}),C=!1;function q(e,t){e||de("Assertion failed: "+t)}var T=3;function F(e){return ee?Pe(e):h(e)}var L="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function $(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&L)return L.decode(e.subarray(t,o));for(var s="";t>10,56320|1023&i)}}else s+=String.fromCharCode((31&_)<<6|a)}else s+=String.fromCharCode(_)}return s}function W(e,t){return e?$(U,e,t):""}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var Z,O,U,j,D,B,H;function z(e){Z=e,Module.HEAP8=O=new Int8Array(e),Module.HEAP16=j=new Int16Array(e),Module.HEAP32=D=new Int32Array(e),Module.HEAPU8=U=new Uint8Array(e),Module.HEAPU16=new Uint16Array(e),Module.HEAPU32=new Uint32Array(e),Module.HEAPF32=B=new Float32Array(e),Module.HEAPF64=H=new Float64Array(e)}var K=7984,G=Module.TOTAL_MEMORY||33554432;function V(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?Module.dynCall_v(r):Module.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(x=Module.wasmMemory?Module.wasmMemory:new WebAssembly.Memory({initial:G/65536}))&&(Z=x.buffer),G=Z.byteLength,z(Z),D[K>>2]=5251024;var X=[],Q=[],Y=[],J=[],ee=!1;function te(e){X.unshift(e)}var re=Math.abs,ne=Math.ceil,oe=Math.floor,se=Math.min,_e=0,ae=null,ue=null;function ie(e){_e++,Module.monitorRunDependencies&&Module.monitorRunDependencies(_e)}function le(e){if(_e--,Module.monitorRunDependencies&&Module.monitorRunDependencies(_e),0==_e&&(null!==ae&&(clearInterval(ae),ae=null),ue)){var t=ue;ue=null,t()}}function de(e){throw Module.onAbort&&Module.onAbort(e),m(e+=""),f(e),C=!0,1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}Module.preloadedImages={},Module.preloadedAudios={},Module.preloadedWasm={},te(function(){if(Module.dynamicLibraries&&Module.dynamicLibraries.length>0&&!i)return ie(),void Promise.all(Module.dynamicLibraries.map(function(e){return y(e,{loadAsync:!0,global:!0,nodelete:!0})})).then(function(){le()});var e;(e=Module.dynamicLibraries)&&e.forEach(function(e){y(e,{global:!0,nodelete:!0})})});var ce="data:application/octet-stream;base64,";function me(e){return String.prototype.startsWith?e.startsWith(ce):0===e.indexOf(ce)}var fe,pe,he,we="tree-sitter.wasm";function ge(){try{if(S)return new Uint8Array(S);if(i)return i(we);throw"both async and sync fetching of the wasm failed"}catch(e){de(e)}}function Me(){de()}function ye(){de()}me(we)||(fe=we,we=Module.locateFile?Module.locateFile(fe,c):c+fe),Q.push({func:function(){Fe()}},{func:function(){ke()}}),Module._abort=Me;var be=r||"undefined"!=typeof dateNow||1;function Ee(){return U.length}function ve(e){try{return x.grow(e-Z.byteLength+65535>>16),z(x.buffer),1}catch(e){}}function Ie(e,t,r){if(ot){const e=W(r);ot(e,0!==t)}}ye=r?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:function(){return performance.now()};var Se=A,Ne={__memory_base:1024,__stack_pointer:5251024,__table_base:1,abort:Me,clock_gettime:function(e,t){var r,n;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!be)return n=28,Module.___errno_location&&(D[Module.___errno_location()>>2]=n),-1;r=ye()}return D[t>>2]=r/1e3|0,D[t+4>>2]=r%1e3*1e3*1e3|0,0},emscripten_memcpy_big:function(e,t,r){U.set(U.subarray(t,t+r),e)},emscripten_resize_heap:function(e){var t=Ee();if(e>2147418112)return!1;for(var r,n,o=1;o<=4;o*=2){var s=t*(1+.2/o);if(s=Math.min(s,e+100663296),ve(Math.min(2147418112,((r=Math.max(16777216,e,s))%(n=65536)>0&&(r+=n-r%n),r))))return!0}return!1},exit:function(e){Ue(e)},fp$tree_sitter_log_callback$viii:function(){return Module._fp$tree_sitter_log_callback$viii.apply(null,arguments)},g$TRANSFER_BUFFER:function(){return Module._TRANSFER_BUFFER},g$__THREW__:function(){return Module.___THREW__},g$__cxa_new_handler:function(){return Module.___cxa_new_handler},g$__threwValue:function(){return Module.___threwValue},memory:x,table:R,tree_sitter_parse_callback:function(e,t,r,n,o){var s=nt(t,{row:r,column:n});"string"==typeof s?(k(o,s.length,"i32"),function(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=(r-=2)<2*e.length?r/2:e.length,o=0;o>1]=s,t+=2}j[t>>1]=0}(s,e,10240)):k(o,0,"i32")}},xe=function(){var e={env:Ne,wasi_snapshot_preview1:Ne};function t(e,t){var r=e.exports;r=b(r,A),Module.asm=r,le()}function r(e){t(e.instance)}function n(t){return(S||!_&&!a||"function"!=typeof fetch?new Promise(function(e,t){e(ge())}):fetch(we,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+we+"'";return e.arrayBuffer()}).catch(function(){return ge()})).then(function(t){return WebAssembly.instantiate(t,e)}).then(t,function(e){f("failed to asynchronously prepare wasm: "+e),de(e)})}if(ie(),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){return f("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(S||"function"!=typeof WebAssembly.instantiateStreaming||me(we)||"function"!=typeof fetch)return n(r);fetch(we,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,e).then(r,function(e){f("wasm streaming compile failed: "+e),f("falling back to ArrayBuffer instantiation"),n(r)})})}(),{}}();Module.asm=xe;var Ae,ke=Module.___wasm_call_ctors=function(){return(ke=Module.___wasm_call_ctors=Module.asm.__wasm_call_ctors).apply(null,arguments)},Pe=(Module._calloc=function(){return(Module._calloc=Module.asm.calloc).apply(null,arguments)},Module._ts_language_symbol_count=function(){return(Module._ts_language_symbol_count=Module.asm.ts_language_symbol_count).apply(null,arguments)},Module._ts_language_version=function(){return(Module._ts_language_version=Module.asm.ts_language_version).apply(null,arguments)},Module._ts_language_field_count=function(){return(Module._ts_language_field_count=Module.asm.ts_language_field_count).apply(null,arguments)},Module._ts_language_symbol_name=function(){return(Module._ts_language_symbol_name=Module.asm.ts_language_symbol_name).apply(null,arguments)},Module._ts_language_symbol_type=function(){return(Module._ts_language_symbol_type=Module.asm.ts_language_symbol_type).apply(null,arguments)},Module._ts_language_field_name_for_id=function(){return(Module._ts_language_field_name_for_id=Module.asm.ts_language_field_name_for_id).apply(null,arguments)},Module._memcpy=function(){return(Module._memcpy=Module.asm.memcpy).apply(null,arguments)},Module._free=function(){return(Module._free=Module.asm.free).apply(null,arguments)},Module._malloc=function(){return(Pe=Module._malloc=Module.asm.malloc).apply(null,arguments)}),Re=(Module._ts_parser_delete=function(){return(Module._ts_parser_delete=Module.asm.ts_parser_delete).apply(null,arguments)},Module._ts_parser_set_language=function(){return(Module._ts_parser_set_language=Module.asm.ts_parser_set_language).apply(null,arguments)},Module._memcmp=function(){return(Module._memcmp=Module.asm.memcmp).apply(null,arguments)},Module._ts_query_new=function(){return(Module._ts_query_new=Module.asm.ts_query_new).apply(null,arguments)},Module._iswspace=function(){return(Module._iswspace=Module.asm.iswspace).apply(null,arguments)},Module._ts_query_delete=function(){return(Module._ts_query_delete=Module.asm.ts_query_delete).apply(null,arguments)},Module._iswalnum=function(){return(Module._iswalnum=Module.asm.iswalnum).apply(null,arguments)},Module._ts_query_pattern_count=function(){return(Module._ts_query_pattern_count=Module.asm.ts_query_pattern_count).apply(null,arguments)},Module._ts_query_capture_count=function(){return(Module._ts_query_capture_count=Module.asm.ts_query_capture_count).apply(null,arguments)},Module._ts_query_string_count=function(){return(Module._ts_query_string_count=Module.asm.ts_query_string_count).apply(null,arguments)},Module._ts_query_capture_name_for_id=function(){return(Module._ts_query_capture_name_for_id=Module.asm.ts_query_capture_name_for_id).apply(null,arguments)},Module._ts_query_string_value_for_id=function(){return(Module._ts_query_string_value_for_id=Module.asm.ts_query_string_value_for_id).apply(null,arguments)},Module._ts_query_predicates_for_pattern=function(){return(Module._ts_query_predicates_for_pattern=Module.asm.ts_query_predicates_for_pattern).apply(null,arguments)},Module._ts_tree_delete=function(){return(Module._ts_tree_delete=Module.asm.ts_tree_delete).apply(null,arguments)},Module._ts_init=function(){return(Module._ts_init=Module.asm.ts_init).apply(null,arguments)},Module._ts_parser_new_wasm=function(){return(Module._ts_parser_new_wasm=Module.asm.ts_parser_new_wasm).apply(null,arguments)},Module._ts_parser_enable_logger_wasm=function(){return(Module._ts_parser_enable_logger_wasm=Module.asm.ts_parser_enable_logger_wasm).apply(null,arguments)},Module._ts_parser_parse_wasm=function(){return(Module._ts_parser_parse_wasm=Module.asm.ts_parser_parse_wasm).apply(null,arguments)},Module._ts_tree_root_node_wasm=function(){return(Module._ts_tree_root_node_wasm=Module.asm.ts_tree_root_node_wasm).apply(null,arguments)},Module._ts_tree_edit_wasm=function(){return(Module._ts_tree_edit_wasm=Module.asm.ts_tree_edit_wasm).apply(null,arguments)},Module._ts_tree_get_changed_ranges_wasm=function(){return(Module._ts_tree_get_changed_ranges_wasm=Module.asm.ts_tree_get_changed_ranges_wasm).apply(null,arguments)},Module._ts_tree_cursor_new_wasm=function(){return(Module._ts_tree_cursor_new_wasm=Module.asm.ts_tree_cursor_new_wasm).apply(null,arguments)},Module._ts_tree_cursor_delete_wasm=function(){return(Module._ts_tree_cursor_delete_wasm=Module.asm.ts_tree_cursor_delete_wasm).apply(null,arguments)},Module._ts_tree_cursor_reset_wasm=function(){return(Module._ts_tree_cursor_reset_wasm=Module.asm.ts_tree_cursor_reset_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_first_child_wasm=function(){return(Module._ts_tree_cursor_goto_first_child_wasm=Module.asm.ts_tree_cursor_goto_first_child_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_next_sibling_wasm=function(){return(Module._ts_tree_cursor_goto_next_sibling_wasm=Module.asm.ts_tree_cursor_goto_next_sibling_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_parent_wasm=function(){return(Module._ts_tree_cursor_goto_parent_wasm=Module.asm.ts_tree_cursor_goto_parent_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_type_id_wasm=function(){return(Module._ts_tree_cursor_current_node_type_id_wasm=Module.asm.ts_tree_cursor_current_node_type_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_is_named_wasm=function(){return(Module._ts_tree_cursor_current_node_is_named_wasm=Module.asm.ts_tree_cursor_current_node_is_named_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_is_missing_wasm=function(){return(Module._ts_tree_cursor_current_node_is_missing_wasm=Module.asm.ts_tree_cursor_current_node_is_missing_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_id_wasm=function(){return(Module._ts_tree_cursor_current_node_id_wasm=Module.asm.ts_tree_cursor_current_node_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_start_position_wasm=function(){return(Module._ts_tree_cursor_start_position_wasm=Module.asm.ts_tree_cursor_start_position_wasm).apply(null,arguments)},Module._ts_tree_cursor_end_position_wasm=function(){return(Module._ts_tree_cursor_end_position_wasm=Module.asm.ts_tree_cursor_end_position_wasm).apply(null,arguments)},Module._ts_tree_cursor_start_index_wasm=function(){return(Module._ts_tree_cursor_start_index_wasm=Module.asm.ts_tree_cursor_start_index_wasm).apply(null,arguments)},Module._ts_tree_cursor_end_index_wasm=function(){return(Module._ts_tree_cursor_end_index_wasm=Module.asm.ts_tree_cursor_end_index_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_field_id_wasm=function(){return(Module._ts_tree_cursor_current_field_id_wasm=Module.asm.ts_tree_cursor_current_field_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_wasm=function(){return(Module._ts_tree_cursor_current_node_wasm=Module.asm.ts_tree_cursor_current_node_wasm).apply(null,arguments)},Module._ts_node_symbol_wasm=function(){return(Module._ts_node_symbol_wasm=Module.asm.ts_node_symbol_wasm).apply(null,arguments)},Module._ts_node_child_count_wasm=function(){return(Module._ts_node_child_count_wasm=Module.asm.ts_node_child_count_wasm).apply(null,arguments)},Module._ts_node_named_child_count_wasm=function(){return(Module._ts_node_named_child_count_wasm=Module.asm.ts_node_named_child_count_wasm).apply(null,arguments)},Module._ts_node_child_wasm=function(){return(Module._ts_node_child_wasm=Module.asm.ts_node_child_wasm).apply(null,arguments)},Module._ts_node_named_child_wasm=function(){return(Module._ts_node_named_child_wasm=Module.asm.ts_node_named_child_wasm).apply(null,arguments)},Module._ts_node_child_by_field_id_wasm=function(){return(Module._ts_node_child_by_field_id_wasm=Module.asm.ts_node_child_by_field_id_wasm).apply(null,arguments)},Module._ts_node_next_sibling_wasm=function(){return(Module._ts_node_next_sibling_wasm=Module.asm.ts_node_next_sibling_wasm).apply(null,arguments)},Module._ts_node_prev_sibling_wasm=function(){return(Module._ts_node_prev_sibling_wasm=Module.asm.ts_node_prev_sibling_wasm).apply(null,arguments)},Module._ts_node_next_named_sibling_wasm=function(){return(Module._ts_node_next_named_sibling_wasm=Module.asm.ts_node_next_named_sibling_wasm).apply(null,arguments)},Module._ts_node_prev_named_sibling_wasm=function(){return(Module._ts_node_prev_named_sibling_wasm=Module.asm.ts_node_prev_named_sibling_wasm).apply(null,arguments)},Module._ts_node_parent_wasm=function(){return(Module._ts_node_parent_wasm=Module.asm.ts_node_parent_wasm).apply(null,arguments)},Module._ts_node_descendant_for_index_wasm=function(){return(Module._ts_node_descendant_for_index_wasm=Module.asm.ts_node_descendant_for_index_wasm).apply(null,arguments)},Module._ts_node_named_descendant_for_index_wasm=function(){return(Module._ts_node_named_descendant_for_index_wasm=Module.asm.ts_node_named_descendant_for_index_wasm).apply(null,arguments)},Module._ts_node_descendant_for_position_wasm=function(){return(Module._ts_node_descendant_for_position_wasm=Module.asm.ts_node_descendant_for_position_wasm).apply(null,arguments)},Module._ts_node_named_descendant_for_position_wasm=function(){return(Module._ts_node_named_descendant_for_position_wasm=Module.asm.ts_node_named_descendant_for_position_wasm).apply(null,arguments)},Module._ts_node_start_point_wasm=function(){return(Module._ts_node_start_point_wasm=Module.asm.ts_node_start_point_wasm).apply(null,arguments)},Module._ts_node_end_point_wasm=function(){return(Module._ts_node_end_point_wasm=Module.asm.ts_node_end_point_wasm).apply(null,arguments)},Module._ts_node_start_index_wasm=function(){return(Module._ts_node_start_index_wasm=Module.asm.ts_node_start_index_wasm).apply(null,arguments)},Module._ts_node_end_index_wasm=function(){return(Module._ts_node_end_index_wasm=Module.asm.ts_node_end_index_wasm).apply(null,arguments)},Module._ts_node_to_string_wasm=function(){return(Module._ts_node_to_string_wasm=Module.asm.ts_node_to_string_wasm).apply(null,arguments)},Module._ts_node_children_wasm=function(){return(Module._ts_node_children_wasm=Module.asm.ts_node_children_wasm).apply(null,arguments)},Module._ts_node_named_children_wasm=function(){return(Module._ts_node_named_children_wasm=Module.asm.ts_node_named_children_wasm).apply(null,arguments)},Module._ts_node_descendants_of_type_wasm=function(){return(Module._ts_node_descendants_of_type_wasm=Module.asm.ts_node_descendants_of_type_wasm).apply(null,arguments)},Module._ts_node_is_named_wasm=function(){return(Module._ts_node_is_named_wasm=Module.asm.ts_node_is_named_wasm).apply(null,arguments)},Module._ts_node_has_changes_wasm=function(){return(Module._ts_node_has_changes_wasm=Module.asm.ts_node_has_changes_wasm).apply(null,arguments)},Module._ts_node_has_error_wasm=function(){return(Module._ts_node_has_error_wasm=Module.asm.ts_node_has_error_wasm).apply(null,arguments)},Module._ts_node_is_missing_wasm=function(){return(Module._ts_node_is_missing_wasm=Module.asm.ts_node_is_missing_wasm).apply(null,arguments)},Module._ts_query_matches_wasm=function(){return(Module._ts_query_matches_wasm=Module.asm.ts_query_matches_wasm).apply(null,arguments)},Module._ts_query_captures_wasm=function(){return(Module._ts_query_captures_wasm=Module.asm.ts_query_captures_wasm).apply(null,arguments)},Module._iswdigit=function(){return(Module._iswdigit=Module.asm.iswdigit).apply(null,arguments)},Module._iswalpha=function(){return(Module._iswalpha=Module.asm.iswalpha).apply(null,arguments)},Module._iswlower=function(){return(Module._iswlower=Module.asm.iswlower).apply(null,arguments)},Module._towupper=function(){return(Module._towupper=Module.asm.towupper).apply(null,arguments)},Module._memchr=function(){return(Module._memchr=Module.asm.memchr).apply(null,arguments)},Module._strlen=function(){return(Module._strlen=Module.asm.strlen).apply(null,arguments)},Module._setThrew=function(){return(Re=Module._setThrew=Module.asm.setThrew).apply(null,arguments)}),Ce=(Module.__Znwm=function(){return(Module.__Znwm=Module.asm._Znwm).apply(null,arguments)},Module.__ZdlPv=function(){return(Module.__ZdlPv=Module.asm._ZdlPv).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc).apply(null,arguments)},Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return(Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.asm._ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_).apply(null,arguments)},Module.__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv=function(){return(Module.__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv=Module.asm._ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv).apply(null,arguments)},Module.stackSave=function(){return(Ce=Module.stackSave=Module.asm.stackSave).apply(null,arguments)}),qe=Module.stackAlloc=function(){return(qe=Module.stackAlloc=Module.asm.stackAlloc).apply(null,arguments)},Te=Module.stackRestore=function(){return(Te=Module.stackRestore=Module.asm.stackRestore).apply(null,arguments)},Fe=Module.___assign_got_enties=function(){return(Fe=Module.___assign_got_enties=Module.asm.__assign_got_enties).apply(null,arguments)},Le=(Module.dynCall_vi=function(){return(Module.dynCall_vi=Module.asm.dynCall_vi).apply(null,arguments)},{__cxa_new_handler:6112,__data_end:6960,__THREW__:6952,TRANSFER_BUFFER:1472,__threwValue:6956});for(var $e in Le)Module["_"+$e]=Se+Le[$e];for(var $e in Module.NAMED_GLOBALS=Le,Le)!function(e){var t=Module["_"+e];Module["g$_"+e]=function(){return t}}($e);function We(){var e=Ce();try{var t=Array.prototype.slice.call(arguments);return R.get(t[0]).apply(null,t.slice(1))}catch(t){if(Te(e),t!==t+0&&"longjmp"!==t)throw t;Re(1,0)}}function Ze(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Module._fp$tree_sitter_log_callback$viii=function(){q(Module._tree_sitter_log_callback||!0,"external function `tree_sitter_log_callback` is missing.perhaps a side module was not linked in? if this symbol was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=XX in the environment");var e=Module.asm.tree_sitter_log_callback;e||(e=Module._tree_sitter_log_callback),e||(e=Module._tree_sitter_log_callback),e||(e=Ie);var t=I(e,"viii");return Module._fp$tree_sitter_log_callback$viii=function(){return t},t},Module.asm=xe,Module.allocate=function(e,t,r,n){var o,s;"number"==typeof e?(o=!0,s=e):(o=!1,s=e.length);var _,a="string"==typeof t?t:null;if(_=r==T?n:[Pe,qe,h][r](Math.max(s,a?1:t.length)),o){var u;for(n=_,q(0==(3&_)),u=_+(-4&s);n>2]=0;for(u=_+s;n>0]=0;return _}if("i8"===a)return e.subarray||e.slice?U.set(e,_):U.set(new Uint8Array(e),_),_;for(var i,l,d,c=0;c0||(!function(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)te(Module.preRun.shift());V(X)}(),_e>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),t()},1)):t()))}function Ue(e,t){t&&N&&0===e||(N||(C=!0,e,!0,Module.onExit&&Module.onExit(e)),s(e,new Ze(e)))}if(ue=function e(){Ae||Oe(),Ae||(ue=e)},Module.run=Oe,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var je=!0;Module.noInitialRun&&(je=!1),N=!0,Oe();const De=Module,Be={},He=4,ze=5*He,Ke=2*He,Ge=2*He+2*Ke,Ve={row:0,column:0},Xe=/[\w-.]*/g,Qe=1,Ye=2,Je=/^_?tree_sitter_\w+/;var et,tt,rt,nt,ot,st=new Promise(e=>{Module.onRuntimeInitialized=e}).then(()=>{rt=De._ts_init(),et=P(rt,"i32"),tt=P(rt+He,"i32")});class Parser{static init(){return st}constructor(){if(null==rt)throw new Error("You must first call Parser.init() and wait for it to resolve.");De._ts_parser_new_wasm(),this[0]=P(rt,"i32"),this[1]=P(rt+He,"i32")}delete(){De._ts_parser_delete(this[0]),De._free(this[1])}setLanguage(e){let t;if(e){if(e.constructor!==Language)throw new Error("Argument must be a Language");{t=e[0];const r=De._ts_language_version(t);if(re.slice(t,n));else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");nt=e}this.logCallback?(ot=this.logCallback,De._ts_parser_enable_logger_wasm(this[0],1)):(ot=null,De._ts_parser_enable_logger_wasm(this[0],0));let n=0,o=0;if(r&&r.includedRanges){n=r.includedRanges.length;let e=o=De._calloc(n,Ge);for(let t=0;t0){let e=r;for(let r=0;r0){let r=t;for(let t=0;t0){let r=t;for(let t=0;t0){let e=a;for(let t=0;t<_;t++)u[t]=dt(this.tree,e),e+=ze}return De._free(a),De._free(s),u}get nextSibling(){return lt(this),De._ts_node_next_sibling_wasm(this.tree[0]),dt(this.tree)}get previousSibling(){return lt(this),De._ts_node_prev_sibling_wasm(this.tree[0]),dt(this.tree)}get nextNamedSibling(){return lt(this),De._ts_node_next_named_sibling_wasm(this.tree[0]),dt(this.tree)}get previousNamedSibling(){return lt(this),De._ts_node_prev_named_sibling_wasm(this.tree[0]),dt(this.tree)}get parent(){return lt(this),De._ts_node_parent_wasm(this.tree[0]),dt(this.tree)}descendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");lt(this);let r=rt+ze;return k(r,e,"i32"),k(r+He,t,"i32"),De._ts_node_descendant_for_index_wasm(this.tree[0]),dt(this.tree)}namedDescendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");lt(this);let r=rt+ze;return k(r,e,"i32"),k(r+He,t,"i32"),De._ts_node_named_descendant_for_index_wasm(this.tree[0]),dt(this.tree)}descendantForPosition(e,t=e){if(!it(e)||!it(t))throw new Error("Arguments must be {row, column} objects");lt(this);let r=rt+ze;return ft(r,e),ft(r+Ke,t),De._ts_node_descendant_for_position_wasm(this.tree[0]),dt(this.tree)}namedDescendantForPosition(e,t=e){if(!it(e)||!it(t))throw new Error("Arguments must be {row, column} objects");lt(this);let r=rt+ze;return ft(r,e),ft(r+Ke,t),De._ts_node_named_descendant_for_position_wasm(this.tree[0]),dt(this.tree)}walk(){return lt(this),De._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(Be,this.tree)}toString(){lt(this);const e=De._ts_node_to_string_wasm(this.tree[0]),t=function(e){for(var t="";;){var r=U[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}}(e);return De._free(e),t}}class TreeCursor{constructor(e,t){ut(e),this.tree=t,mt(this)}delete(){ct(this),De._ts_tree_cursor_delete_wasm(this.tree[0])}reset(e){lt(e),ct(this,rt+ze),De._ts_tree_cursor_reset_wasm(this.tree[0]),mt(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return ct(this),De._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return ct(this),De._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return ct(this),1===De._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return ct(this),1===De._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){ct(this);const e=De._ts_tree_cursor_start_index_wasm(this.tree[0]),t=De._ts_tree_cursor_end_index_wasm(this.tree[0]);return _t(this.tree,e,t)}get startPosition(){return ct(this),De._ts_tree_cursor_start_position_wasm(this.tree[0]),pt(rt)}get endPosition(){return ct(this),De._ts_tree_cursor_end_position_wasm(this.tree[0]),pt(rt)}get startIndex(){return ct(this),De._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return ct(this),De._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return ct(this),De._ts_tree_cursor_current_node_wasm(this.tree[0]),dt(this.tree)}currentFieldId(){return ct(this),De._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){ct(this);const e=De._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return mt(this),1===e}gotoNextSibling(){ct(this);const e=De._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return mt(this),1===e}gotoParent(){ct(this);const e=De._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return mt(this),1===e}}class Language{constructor(e,t){ut(e),this[0]=t,this.types=new Array(De._ts_language_symbol_count(this[0]));for(let e=0,t=this.types.length;e=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}(e),r=De._malloc(t+1);(function(e,t,r,n){if(!(n>0))return 0;for(var o=r,s=r+n-1,_=0;_=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++_)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}t[r]=0})(e,U,r,t+1);const n=De._ts_query_new(this[0],r,t,rt,rt+He);if(!n){const t=P(rt+He,"i32"),n=W(r,P(rt,"i32")).length,o=e.substr(n,100),s=o.match(Xe)[0];let _;switch(t){case 2:_=new RangeError(`Bad node name '${s}'`);break;case 3:_=new RangeError(`Bad field name '${s}'`);break;case 4:_=new RangeError(`Bad capture name @${s}`);break;default:_=new SyntaxError(`Bad syntax at offset ${n}: '${o}'...`)}throw _.index=n,_.length=s.length,De._free(r),_}const o=De._ts_query_string_count(n),s=De._ts_query_capture_count(n),_=De._ts_query_pattern_count(n),a=new Array(s),u=new Array(o);for(let e=0;e0){if("string"!==o[0].type)throw new Error("Predicates must begin with a literal value");const t=o[0].value;let r=!0;switch(t){case"not-eq?":r=!1;case"eq?":if(3!==o.length)throw new Error(`Wrong number of arguments to \`eq?\` predicate. Expected 2, got ${o.length-1}`);if("capture"!==o[1].type)throw new Error(`First argument of \`eq?\` predicate must be a capture. Got "${o[1].value}"`);if("capture"===o[2].type){const t=o[1].name,n=o[2].name;c[e].push(function(e){let o,s;for(const r of e)r.name===t&&(o=r.node),r.name===n&&(s=r.node);return o.text===s.text===r})}else{const t=o[1].name,n=o[2].value;c[e].push(function(e){for(const o of e)if(o.name===t)return o.node.text===n===r;return!1})}break;case"match?":if(3!==o.length)throw new Error(`Wrong number of arguments to \`match?\` predicate. Expected 2, got ${o.length-1}.`);if("capture"!==o[1].type)throw new Error(`First argument of \`match?\` predicate must be a capture. Got "${o[1].value}".`);if("string"!==o[2].type)throw new Error(`Second argument of \`match?\` predicate must be a string. Got @${o[2].value}.`);const n=o[1].name,s=new RegExp(o[2].value);c[e].push(function(e){for(const t of e)if(t.name===n)return s.test(t.node.text);return!1});break;case"set!":if(o.length<2||o.length>3)throw new Error(`Wrong number of arguments to \`set!\` predicate. Expected 1 or 2. Got ${o.length-1}.`);if(o.some(e=>"string"!==e.type))throw new Error('Arguments to `set!` predicate must be a strings.".');i[e]||(i[e]={}),i[e][o[1].value]=o[2]?o[2].value:null;break;case"is?":case"is-not?":if(o.length<2||o.length>3)throw new Error(`Wrong number of arguments to \`${t}\` predicate. Expected 1 or 2. Got ${o.length-1}.`);if(o.some(e=>"string"!==e.type))throw new Error(`Arguments to \`${t}\` predicate must be a strings.".`);const _="is?"===t?l:d;_[e]||(_[e]={}),_[e][o[1].value]=o[2]?o[2].value:null;break;default:throw new Error(`Unknown query predicate \`${o[0].value}\``)}o.length=0}}Object.freeze(i[e]),Object.freeze(l[e]),Object.freeze(d[e])}return De._free(r),new Query(Be,n,a,c,Object.freeze(i),Object.freeze(l),Object.freeze(d))}static load(e){let t;if("undefined"!=typeof process&&process.versions&&process.versions.node){const r=require("fs");t=Promise.resolve(r.readFileSync(e))}else t=fetch(e).then(e=>e.arrayBuffer().then(t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}));return t.then(e=>E(e,{loadAsync:!0})).then(e=>{const t=e[Object.keys(e).find(e=>Je.test(e)&&!e.includes("external_scanner_"))]();return new Language(Be,t)})}}class Query{constructor(e,t,r,n,o,s,_){ut(e),this[0]=t,this.captureNames=r,this.predicates=n,this.setProperties=o,this.assertedProperties=s,this.refutedProperties=_}delete(){De._ts_query_delete(this[0])}matches(e,t,r){t||(t=Ve),r||(r=Ve),lt(e),De._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column);const n=P(rt,"i32"),o=P(rt+He,"i32"),s=new Array(n);let _=o;for(let t=0;te(o))){s[t]={pattern:r,captures:o};const e=this.setProperties[r];e&&(s[t].setProperties=e);const n=this.assertedProperties[r];n&&(s[t].assertedProperties=n);const _=this.refutedProperties[r];_&&(s[t].refutedProperties=_)}}return De._free(o),s}captures(e,t,r){t||(t=Ve),r||(r=Ve),lt(e),De._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column);const n=P(rt,"i32"),o=P(rt+He,"i32"),s=[],_=[];let a=o;for(let t=0;te(_))){const e=_[n],r=this.setProperties[t];r&&(e.setProperties=r);const o=this.assertedProperties[t];o&&(e.assertedProperties=o);const a=this.refutedProperties[t];a&&(e.refutedProperties=a),s.push(e)}}return De._free(o),s}}function _t(e,t,r){const n=r-t;let o=e.textCallback(t,null,r);for(t+=o.length;t0))break;t+=n.length,o+=n}return t>r&&(o=o.slice(0,n)),o}function at(e,t,r,n){for(let o=0,s=n.length;o1&&(u=process.argv[1].replace(/\\/g,"/")),o=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(e){if(!(e instanceof Qe))throw e}),process.on("unhandledRejection",ye),i=function(e){process.exit(e)},Module.inspect=function(){return"[Emscripten Module object]"}):r?("undefined"!=typeof read&&(_=function(e){return read(e)}),d=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(O("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),"function"==typeof quit&&(i=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(s||a)&&(a?p=self.location.href:document.currentScript&&(p=document.currentScript.src),p=0!==p.indexOf("blob:")?p.substr(0,p.lastIndexOf("/")+1):"",_=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},a&&(d=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)});var m=Module.print||console.log.bind(console),h=Module.printErr||console.warn.bind(console);for(e in t)t.hasOwnProperty(e)&&(Module[e]=t[e]);t=null,Module.arguments&&(o=Module.arguments),Module.thisProgram&&(u=Module.thisProgram),Module.quit&&(i=Module.quit);var M=16;function g(e){var t=V[te>>2],n=t+e+15&-16;return n>Se()&&ye(),V[te>>2]=n,t}function y(e,t){return t||(t=M),Math.ceil(e/t)*t}function w(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:if("*"===e[e.length-1])return 4;if("i"===e[0]){var t=parseInt(e.substr(1));return O(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8}return 0}}var b={"f64-rem":function(e,t){return e%t},debugger:function(){}},v={nextHandle:1,loadedLibs:{"-1":{refcount:1/0,name:"__self__",module:Module,global:!0}},loadedLibNames:{__self__:-1}};function E(e,t){t=t||{global:!0,nodelete:!0};var n,r=v.loadedLibNames[e];if(r)return n=v.loadedLibs[r],t.global&&!n.global&&(n.global=!0,"loading"!==n.module&&s(n.module)),t.nodelete&&n.refcount!==1/0&&(n.refcount=1/0),n.refcount++,t.loadAsync?Promise.resolve(r):r;function o(){if(t.fs){var n=t.fs.readFile(e,{encoding:"binary"});return n instanceof Uint8Array||(n=new Uint8Array(lib_data)),t.loadAsync?Promise.resolve(n):n}return t.loadAsync?(r=e,fetch(r,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load binary file at '"+r+"'";return e.arrayBuffer()}).then(function(e){return new Uint8Array(e)})):d(e);var r}function u(e){return I(e,t)}function i(){if(void 0!==Module.preloadedWasm&&void 0!==Module.preloadedWasm[e]){var n=Module.preloadedWasm[e];return t.loadAsync?Promise.resolve(n):n}return t.loadAsync?o().then(function(e){return u(e)}):u(o())}function s(e){for(var t in e)if(e.hasOwnProperty(t)){var n=t;"_"===t[0]&&(Module.hasOwnProperty(n)||(Module[n]=e[t]))}}function a(e){n.global&&s(e),n.module=e}return r=v.nextHandle++,n={refcount:t.nodelete?1/0:1,name:e,module:"loading",global:t.global},v.loadedLibNames[e]=r,v.loadedLibs[r]=n,t.loadAsync?i().then(function(e){return a(e),r}):(a(i()),r)}function A(e,t,n,r){var o={};for(var u in e){var i=e[u];"object"==typeof i&&(i=i.value),"number"==typeof i&&(i+=t),o[u]=i,r&&(r[u]=i)}return o}function I(e,t){O(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0],"need to see wasm magic number"),O(0===e[8],"need the dylink section to be first");var n=9;function r(){for(var t=0,r=1;;){var o=e[n++];if(t+=(127&o)*r,r*=128,!(128&o))break}return t}r();O(6===e[n]),O(e[++n]==="d".charCodeAt(0)),O(e[++n]==="y".charCodeAt(0)),O(e[++n]==="l".charCodeAt(0)),O(e[++n]==="i".charCodeAt(0)),O(e[++n]==="n".charCodeAt(0)),O(e[++n]==="k".charCodeAt(0)),n++;for(var o=r(),u=r(),i=r(),s=r(),a=r(),l=[],_=0;_>0]=t;break;case"i16":K[e>>1]=t;break;case"i32":V[e>>2]=t;break;case"i64":Ae=[t>>>0,(Ee=t,+_e(Ee)>=1?Ee>0?(0|fe(+ce(Ee/4294967296),4294967295))>>>0:~~+de((Ee-+(~~Ee>>>0))/4294967296)>>>0:0)],V[e>>2]=Ae[0],V[e+4>>2]=Ae[1];break;case"float":Q[e>>2]=t;break;case"double":Y[e>>3]=t;break;default:ye("invalid type for setValue: "+n)}}function L(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return G[e>>0];case"i16":return K[e>>1];case"i32":case"i64":return V[e>>2];case"float":return Q[e>>2];case"double":return Y[e>>3];default:ye("invalid type for getValue: "+t)}return null}R=y(R,16),Module.wasmBinary&&(x=Module.wasmBinary),Module.noExitRuntime&&(S=Module.noExitRuntime),"object"!=typeof WebAssembly&&h("no native wasm support detected");var q=new WebAssembly.Table({initial:16,element:"anyfunc"}),F=!1;function O(e,t){e||ye("Assertion failed: "+t)}var W=3;function $(e){return ae?ze(e):g(e)}var U="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function j(e,t,n){for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.subarray&&U)return U.decode(e.subarray(t,o));for(var u="";t>10,56320|1023&l)}}else u+=String.fromCharCode((31&i)<<6|s)}else u+=String.fromCharCode(i)}return u}function D(e,t){return e?j(X,e,t):""}function Z(e,t,n,r){if(!(r>0))return 0;for(var o=n,u=n+r-1,i=0;i=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(s<=127){if(n>=u)break;t[n++]=s}else if(s<=2047){if(n+1>=u)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=u)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=u)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}return t[n]=0,n-o}function B(e){for(var t=0,n=0;n=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function H(e){var t=B(e)+1,n=Ge(t);return Z(e,G,n,t),n}var z,G,X,K,V,Q,Y;function J(e,t){return e%t>0&&(e+=t-e%t),e}function ee(e){z=e,Module.HEAP8=G=new Int8Array(e),Module.HEAP16=K=new Int16Array(e),Module.HEAP32=V=new Int32Array(e),Module.HEAPU8=X=new Uint8Array(e),Module.HEAPU16=new Uint16Array(e),Module.HEAPU32=new Uint32Array(e),Module.HEAPF32=Q=new Float32Array(e),Module.HEAPF64=Y=new Float64Array(e)}var te=7872,ne=Module.TOTAL_MEMORY||33554432;function re(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?Module.dynCall_v(n):Module.dynCall_vi(n,t.arg):n(void 0===t.arg?null:t.arg)}else t()}}(P=Module.wasmMemory?Module.wasmMemory:new WebAssembly.Memory({initial:ne/65536}))&&(z=P.buffer),ne=z.byteLength,ee(z),V[te>>2]=5250960;var oe=[],ue=[],ie=[],se=[],ae=!1;function le(e){oe.unshift(e)}var _e=Math.abs,de=Math.ceil,ce=Math.floor,fe=Math.min,pe=0,me=null,he=null;function Me(e){pe++,Module.monitorRunDependencies&&Module.monitorRunDependencies(pe)}function ge(e){if(pe--,Module.monitorRunDependencies&&Module.monitorRunDependencies(pe),0==pe&&(null!==me&&(clearInterval(me),me=null),he)){var t=he;he=null,t()}}function ye(e){throw Module.onAbort&&Module.onAbort(e),m(e+=""),h(e),F=!0,1,"abort("+e+"). Build with -s ASSERTIONS=1 for more info."}Module.preloadedImages={},Module.preloadedAudios={},Module.preloadedWasm={},le(function(){if(Module.dynamicLibraries&&Module.dynamicLibraries.length>0&&!d)return Me(),void Promise.all(Module.dynamicLibraries.map(function(e){return E(e,{loadAsync:!0,global:!0,nodelete:!0})})).then(function(){ge()});var e;(e=Module.dynamicLibraries)&&e.forEach(function(e){E(e,{global:!0,nodelete:!0})})});var we="data:application/octet-stream;base64,";function be(e){return String.prototype.startsWith?e.startsWith(we):0===e.indexOf(we)}var ve,Ee,Ae,Ie="tree-sitter.wasm";function Ce(){try{if(x)return new Uint8Array(x);if(d)return d(Ie);throw"both async and sync fetching of the wasm failed"}catch(e){ye(e)}}be(Ie)||(ve=Ie,Ie=Module.locateFile?Module.locateFile(ve,p):p+ve),Module.asm=function(){var e={env:Ze,wasi_unstable:Ze,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:b};function t(e,t){var n=e.exports;n=A(n,R),Module.asm=n,ge()}function n(e){t(e.instance)}function r(t){return(x||!s&&!a||"function"!=typeof fetch?new Promise(function(e,t){e(Ce())}):fetch(Ie,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Ie+"'";return e.arrayBuffer()}).catch(function(){return Ce()})).then(function(t){return WebAssembly.instantiate(t,e)}).then(t,function(e){h("failed to asynchronously prepare wasm: "+e),ye(e)})}if(Me(),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){return h("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(x||"function"!=typeof WebAssembly.instantiateStreaming||be(Ie)||"function"!=typeof fetch)return r(n);fetch(Ie,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,e).then(n,function(e){h("wasm streaming compile failed: "+e),h("falling back to ArrayBuffer instantiation"),r(n)})})}(),{}},ue.push({func:function(){He()}});function Ne(){ye()}function xe(){ye()}function Se(){return G.length}function Pe(e,t,n){if(ht){const e=D(n);ht(e,0!==t)}}Module._abort=Ne,xe=l?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:"object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return performance.now()}:Date.now;var ke=R;function Re(e){return e|=0,mftCall_X(e)}function Te(e){return e|=0,0|mftCall_i(e)}function Le(e,t){return e|=0,t|=0,0|mftCall_ii(e,0|t)}function qe(e,t,n,r,o,u,i){return e|=0,t|=0,n=+n,r|=0,o|=0,u|=0,i|=0,0|mftCall_iidiiii(e,0|t,+n,0|r,0|o,0|u,0|i)}function Fe(e,t,n){return e|=0,t|=0,n|=0,0|mftCall_iii(e,0|t,0|n)}function Oe(e,t,n,r){return e|=0,t|=0,n|=0,r|=0,0|mftCall_iiii(e,0|t,0|n,0|r)}function We(e,t,n,r,o){return e|=0,t|=0,n|=0,r|=0,o|=0,0|mftCall_iiiii(e,0|t,0|n,0|r,0|o)}function $e(e){e|=0,mftCall_v(e)}function Ue(e,t){e|=0,t|=0,mftCall_vi(e,0|t)}function je(e,t,n){e|=0,t|=0,n|=0,mftCall_vii(e,0|t,0|n)}function De(e,t,n,r){e|=0,t|=0,n|=0,r|=0,mftCall_viii(e,0|t,0|n,0|r)}var Ze={d:8080,__memory_base:1024,__table_base:0,h:Ne,i:function(e,t){var n,r;if(0===e)n=Date.now();else{if(1!==e||!(l||"undefined"!=typeof dateNow||"object"==typeof performance&&performance&&"function"==typeof performance.now))return r=28,Module.___errno_location&&(V[Module.___errno_location()>>2]=r),-1;n=xe()}return V[t>>2]=n/1e3|0,V[t+4>>2]=n%1e3*1e3*1e3|0,0},m:Se,l:function(e,t,n){X.set(X.subarray(t,t+n),e)},k:function(e){var t=Se();if(e>2147418112)return!1;for(var n=Math.max(t,16777216);n>16),ee(P.buffer),1}catch(e){}}(n)},e:function(e){Je(e)},j:function(e,t,n,r,o){var u=mt(t,{row:n,column:r});"string"==typeof u?(T(o,u.length,"i32"),function(e,t,n){if(void 0===n&&(n=2147483647),n<2)return 0;for(var r=(n-=2)<2*e.length?n/2:e.length,o=0;o>1]=u,t+=2}K[t>>1]=0}(u,e,10240)):T(o,0,"i32")},o:ye,c:0,n:function(){if(!Module.fp$_tree_sitter_log_callback$viii){var e=N(Module._tree_sitter_log_callback||Pe,"viii");Module.fp$_tree_sitter_log_callback$viii=e}return Module.fp$_tree_sitter_log_callback$viii},b:ke,f:function(){return k},memory:P,g:function(e){k=e},table:q,a:8064},Be=Module.asm({},Ze,z);Module.asm=Be;Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return Module.asm.p.apply(null,arguments)},Module.__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv=function(){return Module.asm.q.apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return Module.asm.r.apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return Module.asm.s.apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return Module.asm.t.apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return Module.asm.u.apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_=function(){return Module.asm.v.apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return Module.asm.w.apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return Module.asm.x.apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return Module.asm.y.apply(null,arguments)},Module.__ZdlPv=function(){return Module.asm.z.apply(null,arguments)},Module.__Znwm=function(){return Module.asm.A.apply(null,arguments)};var He=Module.__apply_relocations=function(){return Module.asm.B.apply(null,arguments)},ze=(Module._calloc=function(){return Module.asm.C.apply(null,arguments)},Module._free=function(){return Module.asm.D.apply(null,arguments)},Module._iswalnum=function(){return Module.asm.E.apply(null,arguments)},Module._iswalpha=function(){return Module.asm.F.apply(null,arguments)},Module._iswdigit=function(){return Module.asm.G.apply(null,arguments)},Module._iswlower=function(){return Module.asm.H.apply(null,arguments)},Module._iswspace=function(){return Module.asm.I.apply(null,arguments)},Module._malloc=function(){return Module.asm.J.apply(null,arguments)}),Ge=(Module._memchr=function(){return Module.asm.K.apply(null,arguments)},Module._memcmp=function(){return Module.asm.L.apply(null,arguments)},Module._memcpy=function(){return Module.asm.M.apply(null,arguments)},Module._strlen=function(){return Module.asm.N.apply(null,arguments)},Module._towupper=function(){return Module.asm.O.apply(null,arguments)},Module._ts_init=function(){return Module.asm.P.apply(null,arguments)},Module._ts_language_field_count=function(){return Module.asm.Q.apply(null,arguments)},Module._ts_language_field_name_for_id=function(){return Module.asm.R.apply(null,arguments)},Module._ts_language_symbol_count=function(){return Module.asm.S.apply(null,arguments)},Module._ts_language_symbol_name=function(){return Module.asm.T.apply(null,arguments)},Module._ts_language_symbol_type=function(){return Module.asm.U.apply(null,arguments)},Module._ts_language_version=function(){return Module.asm.V.apply(null,arguments)},Module._ts_node_child_by_field_id_wasm=function(){return Module.asm.W.apply(null,arguments)},Module._ts_node_child_count_wasm=function(){return Module.asm.X.apply(null,arguments)},Module._ts_node_child_wasm=function(){return Module.asm.Y.apply(null,arguments)},Module._ts_node_children_wasm=function(){return Module.asm.Z.apply(null,arguments)},Module._ts_node_descendant_for_index_wasm=function(){return Module.asm._.apply(null,arguments)},Module._ts_node_descendant_for_position_wasm=function(){return Module.asm.$.apply(null,arguments)},Module._ts_node_descendants_of_type_wasm=function(){return Module.asm.aa.apply(null,arguments)},Module._ts_node_end_index_wasm=function(){return Module.asm.ba.apply(null,arguments)},Module._ts_node_end_point_wasm=function(){return Module.asm.ca.apply(null,arguments)},Module._ts_node_has_changes_wasm=function(){return Module.asm.da.apply(null,arguments)},Module._ts_node_has_error_wasm=function(){return Module.asm.ea.apply(null,arguments)},Module._ts_node_is_missing_wasm=function(){return Module.asm.fa.apply(null,arguments)},Module._ts_node_is_named_wasm=function(){return Module.asm.ga.apply(null,arguments)},Module._ts_node_named_child_count_wasm=function(){return Module.asm.ha.apply(null,arguments)},Module._ts_node_named_child_wasm=function(){return Module.asm.ia.apply(null,arguments)},Module._ts_node_named_children_wasm=function(){return Module.asm.ja.apply(null,arguments)},Module._ts_node_named_descendant_for_index_wasm=function(){return Module.asm.ka.apply(null,arguments)},Module._ts_node_named_descendant_for_position_wasm=function(){return Module.asm.la.apply(null,arguments)},Module._ts_node_next_named_sibling_wasm=function(){return Module.asm.ma.apply(null,arguments)},Module._ts_node_next_sibling_wasm=function(){return Module.asm.na.apply(null,arguments)},Module._ts_node_parent_wasm=function(){return Module.asm.oa.apply(null,arguments)},Module._ts_node_prev_named_sibling_wasm=function(){return Module.asm.pa.apply(null,arguments)},Module._ts_node_prev_sibling_wasm=function(){return Module.asm.qa.apply(null,arguments)},Module._ts_node_start_index_wasm=function(){return Module.asm.ra.apply(null,arguments)},Module._ts_node_start_point_wasm=function(){return Module.asm.sa.apply(null,arguments)},Module._ts_node_symbol_wasm=function(){return Module.asm.ta.apply(null,arguments)},Module._ts_node_to_string_wasm=function(){return Module.asm.ua.apply(null,arguments)},Module._ts_parser_delete=function(){return Module.asm.va.apply(null,arguments)},Module._ts_parser_enable_logger_wasm=function(){return Module.asm.wa.apply(null,arguments)},Module._ts_parser_new_wasm=function(){return Module.asm.xa.apply(null,arguments)},Module._ts_parser_parse_wasm=function(){return Module.asm.ya.apply(null,arguments)},Module._ts_parser_set_language=function(){return Module.asm.za.apply(null,arguments)},Module._ts_parser_set_timeout_micros=function(){return Module.asm.Aa.apply(null,arguments)},Module._ts_parser_timeout_micros=function(){return Module.asm.Ba.apply(null,arguments)},Module._ts_query_capture_count=function(){return Module.asm.Ca.apply(null,arguments)},Module._ts_query_capture_name_for_id=function(){return Module.asm.Da.apply(null,arguments)},Module._ts_query_captures_wasm=function(){return Module.asm.Ea.apply(null,arguments)},Module._ts_query_delete=function(){return Module.asm.Fa.apply(null,arguments)},Module._ts_query_matches_wasm=function(){return Module.asm.Ga.apply(null,arguments)},Module._ts_query_new=function(){return Module.asm.Ha.apply(null,arguments)},Module._ts_query_pattern_count=function(){return Module.asm.Ia.apply(null,arguments)},Module._ts_query_predicates_for_pattern=function(){return Module.asm.Ja.apply(null,arguments)},Module._ts_query_string_count=function(){return Module.asm.Ka.apply(null,arguments)},Module._ts_query_string_value_for_id=function(){return Module.asm.La.apply(null,arguments)},Module._ts_tree_cursor_current_field_id_wasm=function(){return Module.asm.Ma.apply(null,arguments)},Module._ts_tree_cursor_current_node_id_wasm=function(){return Module.asm.Na.apply(null,arguments)},Module._ts_tree_cursor_current_node_is_missing_wasm=function(){return Module.asm.Oa.apply(null,arguments)},Module._ts_tree_cursor_current_node_is_named_wasm=function(){return Module.asm.Pa.apply(null,arguments)},Module._ts_tree_cursor_current_node_type_id_wasm=function(){return Module.asm.Qa.apply(null,arguments)},Module._ts_tree_cursor_current_node_wasm=function(){return Module.asm.Ra.apply(null,arguments)},Module._ts_tree_cursor_delete_wasm=function(){return Module.asm.Sa.apply(null,arguments)},Module._ts_tree_cursor_end_index_wasm=function(){return Module.asm.Ta.apply(null,arguments)},Module._ts_tree_cursor_end_position_wasm=function(){return Module.asm.Ua.apply(null,arguments)},Module._ts_tree_cursor_goto_first_child_wasm=function(){return Module.asm.Va.apply(null,arguments)},Module._ts_tree_cursor_goto_next_sibling_wasm=function(){return Module.asm.Wa.apply(null,arguments)},Module._ts_tree_cursor_goto_parent_wasm=function(){return Module.asm.Xa.apply(null,arguments)},Module._ts_tree_cursor_new_wasm=function(){return Module.asm.Ya.apply(null,arguments)},Module._ts_tree_cursor_reset_wasm=function(){return Module.asm.Za.apply(null,arguments)},Module._ts_tree_cursor_start_index_wasm=function(){return Module.asm._a.apply(null,arguments)},Module._ts_tree_cursor_start_position_wasm=function(){return Module.asm.$a.apply(null,arguments)},Module._ts_tree_delete=function(){return Module.asm.ab.apply(null,arguments)},Module._ts_tree_edit_wasm=function(){return Module.asm.bb.apply(null,arguments)},Module._ts_tree_get_changed_ranges_wasm=function(){return Module.asm.cb.apply(null,arguments)},Module._ts_tree_root_node_wasm=function(){return Module.asm.db.apply(null,arguments)},Module.stackAlloc=function(){return Module.asm.pb.apply(null,arguments)}),Re=Module.dynCall_X=function(){return Module.asm.eb.apply(null,arguments)},Te=Module.dynCall_i=function(){return Module.asm.fb.apply(null,arguments)},Le=Module.dynCall_ii=function(){return Module.asm.gb.apply(null,arguments)},qe=Module.dynCall_iidiiii=function(){return Module.asm.hb.apply(null,arguments)},Fe=Module.dynCall_iii=function(){return Module.asm.ib.apply(null,arguments)},Oe=Module.dynCall_iiii=function(){return Module.asm.jb.apply(null,arguments)},We=Module.dynCall_iiiii=function(){return Module.asm.kb.apply(null,arguments)},$e=Module.dynCall_v=function(){return Module.asm.lb.apply(null,arguments)},Ue=Module.dynCall_vi=function(){return Module.asm.mb.apply(null,arguments)},je=Module.dynCall_vii=function(){return Module.asm.nb.apply(null,arguments)},De=Module.dynCall_viii=function(){return Module.asm.ob.apply(null,arguments)};Module.dynCall_X=Re,Module.dynCall_i=Te,Module.dynCall_ii=Le,Module.dynCall_iidiiii=qe,Module.dynCall_iii=Fe,Module.dynCall_iiii=Oe,Module.dynCall_iiiii=We,Module.dynCall_v=$e,Module.dynCall_vi=Ue,Module.dynCall_vii=je,Module.dynCall_viii=De;var Xe,Ke={};for(var Ve in Ke)Module["_"+Ve]=ke+Ke[Ve];for(var Ve in Module.NAMED_GLOBALS=Ke,Ke)!function(e){var t=Module["_"+e];Module["g$_"+e]=function(){return t}}(Ve);function Qe(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_,Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev,Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev,Module.asm=Be,Module.allocate=function(e,t,n,r){var o,u;"number"==typeof e?(o=!0,u=e):(o=!1,u=e.length);var i,s="string"==typeof t?t:null;if(i=n==W?r:[ze,Ge,g][n](Math.max(u,s?1:t.length)),o){var a;for(r=i,O(0==(3&i)),a=i+(-4&u);r>2]=0;for(a=i+u;r>0]=0;return i}if("i8"===s)return e.subarray||e.slice?X.set(e,i):X.set(new Uint8Array(e),i),i;for(var l,_,d,c=0;c>2]=H(u);for(var r=1;r>2)+r]=H(e[r-1]);V[(n>>2)+t]=0;try{Je(Module._main(t,n),!0)}catch(e){if(e instanceof Qe)return;if("SimulateInfiniteLoop"==e)return void(S=!0);var o=e;e&&"object"==typeof e&&e.stack&&(o=[e,e.stack]),h("exception thrown: "+o),i(1,e)}finally{!0}}}(e),function(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)e=Module.postRun.shift(),se.unshift(e);var e;re(se)}()))}e=e||o,pe>0||(!function(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)le(Module.preRun.shift());re(oe)}(),pe>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),t()},1)):t()))}function Je(e,t){t&&S&&0===e||(S||(F=!0,e,!0,Module.onExit&&Module.onExit(e)),i(e,new Qe(e)))}if(he=function e(){Xe||Ye(),Xe||(he=e)},Module.run=Ye,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var et=!0;Module.noInitialRun&&(et=!1),S=!0,Ye();const tt=Module,nt={},rt=4,ot=5*rt,ut=2*rt,it=2*rt+2*ut,st={row:0,column:0},at=/[\w-.]*/g,lt=1,_t=2,dt=/^_?tree_sitter_\w+/;var ct,ft,pt,mt,ht,Mt=new Promise(e=>{Module.onRuntimeInitialized=e}).then(()=>{pt=tt._ts_init(),ct=L(pt,"i32"),ft=L(pt+rt,"i32")});class Parser{static init(){return Mt}constructor(){if(null==pt)throw new Error("You must first call Parser.init() and wait for it to resolve.");tt._ts_parser_new_wasm(),this[0]=L(pt,"i32"),this[1]=L(pt+rt,"i32")}delete(){tt._ts_parser_delete(this[0]),tt._free(this[1])}setLanguage(e){let t;if(e){if(e.constructor!==Language)throw new Error("Argument must be a Language");{t=e[0];const n=tt._ts_language_version(t);if(ne.slice(t,r));else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");mt=e}this.logCallback?(ht=this.logCallback,tt._ts_parser_enable_logger_wasm(this[0],1)):(ht=null,tt._ts_parser_enable_logger_wasm(this[0],0));let r=0,o=0;if(n&&n.includedRanges){r=n.includedRanges.length;let e=o=tt._calloc(r,it);for(let t=0;t0){let e=n;for(let n=0;n0){let n=t;for(let t=0;t0){let n=t;for(let t=0;t0){let e=s;for(let t=0;t>0];if(!n)return t;t+=String.fromCharCode(n)}}(e);return tt._free(e),t}}class TreeCursor{constructor(e,t){wt(e),this.tree=t,It(this)}delete(){At(this),tt._ts_tree_cursor_delete_wasm(this.tree[0])}reset(e){vt(e),At(this,pt+ot),tt._ts_tree_cursor_reset_wasm(this.tree[0]),It(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return At(this),tt._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return At(this),tt._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return At(this),1===tt._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return At(this),1===tt._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){At(this);const e=tt._ts_tree_cursor_start_index_wasm(this.tree[0]),t=tt._ts_tree_cursor_end_index_wasm(this.tree[0]);return gt(this.tree,e,t)}get startPosition(){return At(this),tt._ts_tree_cursor_start_position_wasm(this.tree[0]),Nt(pt)}get endPosition(){return At(this),tt._ts_tree_cursor_end_position_wasm(this.tree[0]),Nt(pt)}get startIndex(){return At(this),tt._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return At(this),tt._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return At(this),tt._ts_tree_cursor_current_node_wasm(this.tree[0]),Et(this.tree)}currentFieldId(){return At(this),tt._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){At(this);const e=tt._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return It(this),1===e}gotoNextSibling(){At(this);const e=tt._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return It(this),1===e}gotoParent(){At(this);const e=tt._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return It(this),1===e}}class Language{constructor(e,t){wt(e),this[0]=t,this.types=new Array(tt._ts_language_symbol_count(this[0]));for(let e=0,t=this.types.length;e0){if("string"!==o[0].type)throw new Error("Predicates must begin with a literal value");const t=o[0].value;let n=!0;switch(t){case"not-eq?":n=!1;case"eq?":if(3!==o.length)throw new Error(`Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${o.length-1}`);if("capture"!==o[1].type)throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${o[1].value}"`);if("capture"===o[2].type){const t=o[1].name,r=o[2].name;c[e].push(function(e){let o,u;for(const n of e)n.name===t&&(o=n.node),n.name===r&&(u=n.node);return o.text===u.text===n})}else{const t=o[1].name,r=o[2].value;c[e].push(function(e){for(const o of e)if(o.name===t)return o.node.text===r===n;return!1})}break;case"match?":if(3!==o.length)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${o.length-1}.`);if("capture"!==o[1].type)throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${o[1].value}".`);if("string"!==o[2].type)throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${o[2].value}.`);const r=o[1].name,u=new RegExp(o[2].value);c[e].push(function(e){for(const t of e)if(t.name===r)return u.test(t.node.text);return!1});break;case"set!":if(o.length<2||o.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${o.length-1}.`);if(o.some(e=>"string"!==e.type))throw new Error('Arguments to `#set!` predicate must be a strings.".');l[e]||(l[e]={}),l[e][o[1].value]=o[2]?o[2].value:null;break;case"is?":case"is-not?":if(o.length<2||o.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${o.length-1}.`);if(o.some(e=>"string"!==e.type))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const i="is?"===t?_:d;i[e]||(i[e]={}),i[e][o[1].value]=o[2]?o[2].value:null;break;default:throw new Error(`Unknown query predicate \`#${o[0].value}\``)}o.length=0}}Object.freeze(l[e]),Object.freeze(_[e]),Object.freeze(d[e])}return tt._free(n),new Query(nt,r,s,c,Object.freeze(l),Object.freeze(_),Object.freeze(d))}static load(e){let t;if("undefined"!=typeof process&&process.versions&&process.versions.node){const n=require("fs");t=Promise.resolve(n.readFileSync(e))}else t=fetch(e).then(e=>e.arrayBuffer().then(t=>{if(e.ok)return new Uint8Array(t);{const n=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${n}`)}}));return t.then(e=>I(e,{loadAsync:!0})).then(e=>{const t=Object.keys(e),n=t.find(e=>dt.test(e)&&!e.includes("external_scanner_"));n||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const r=e[n]();return new Language(nt,r)})}}class Query{constructor(e,t,n,r,o,u,i){wt(e),this[0]=t,this.captureNames=n,this.predicates=r,this.setProperties=o,this.assertedProperties=u,this.refutedProperties=i}delete(){tt._ts_query_delete(this[0])}matches(e,t,n){t||(t=st),n||(n=st),vt(e),tt._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,n.row,n.column);const r=L(pt,"i32"),o=L(pt+rt,"i32"),u=new Array(r);let i=o;for(let t=0;te(o))){u[t]={pattern:n,captures:o};const e=this.setProperties[n];e&&(u[t].setProperties=e);const r=this.assertedProperties[n];r&&(u[t].assertedProperties=r);const i=this.refutedProperties[n];i&&(u[t].refutedProperties=i)}}return tt._free(o),u}captures(e,t,n){t||(t=st),n||(n=st),vt(e),tt._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,n.row,n.column);const r=L(pt,"i32"),o=L(pt+rt,"i32"),u=[],i=[];let s=o;for(let t=0;te(i))){const e=i[r],n=this.setProperties[t];n&&(e.setProperties=n);const o=this.assertedProperties[t];o&&(e.assertedProperties=o);const s=this.refutedProperties[t];s&&(e.refutedProperties=s),u.push(e)}}return tt._free(o),u}}function gt(e,t,n){const r=n-t;let o=e.textCallback(t,null,n);for(t+=o.length;t0))break;t+=r.length,o+=r}return t>n&&(o=o.slice(0,r)),o}function yt(e,t,n,r){for(let o=0,u=r.length;o - + Tree-sitter Markdown Playground @@ -24,7 +24,7 @@ } -

Tree-sitter Markdown v0.3.1

+

Tree-sitter Markdown v0.4.0