pax_global_header00006660000000000000000000000064143254770330014522gustar00rootroot0000000000000052 comment=cc792d194f135bc847d1e14680974560fd03a140 lang-wast-6.0.1/000077500000000000000000000000001432547703300134235ustar00rootroot00000000000000lang-wast-6.0.1/.github/000077500000000000000000000000001432547703300147635ustar00rootroot00000000000000lang-wast-6.0.1/.github/workflows/000077500000000000000000000000001432547703300170205ustar00rootroot00000000000000lang-wast-6.0.1/.github/workflows/dispatch.yml000066400000000000000000000006371432547703300213500ustar00rootroot00000000000000name: Trigger CI on: push jobs: build: name: Dispatch to main repo runs-on: ubuntu-latest steps: - name: Emit repository_dispatch uses: mvasigh/dispatch-action@main with: # You should create a personal access token and store it in your repository token: ${{ secrets.DISPATCH_AUTH }} repo: dev owner: codemirror event_type: push lang-wast-6.0.1/.gitignore000066400000000000000000000001271432547703300154130ustar00rootroot00000000000000/node_modules package-lock.json /dist /test/*.js /test/*.d.ts /test/*.d.ts.map .tern-* lang-wast-6.0.1/.npmignore000066400000000000000000000001001432547703300154110ustar00rootroot00000000000000/src /test /node_modules .tern-* rollup.config.js tsconfig.json lang-wast-6.0.1/CHANGELOG.md000066400000000000000000000004601432547703300152340ustar00rootroot00000000000000## 6.0.1 (2022-10-24) ### Bug fixes Make sure the language object has a name. ## 6.0.0 (2022-06-08) ### Breaking changes Update dependencies to 6.0.0 ## 0.20.0 (2022-04-20) ### Breaking changes Update dependencies to 0.20.0 ## 0.19.0 (2021-09-14) ### Breaking changes First numbered release. lang-wast-6.0.1/LICENSE000066400000000000000000000021301432547703300144240ustar00rootroot00000000000000MIT License Copyright (C) 2018-2021 by Marijn Haverbeke and others Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. lang-wast-6.0.1/README.md000066400000000000000000000027431432547703300147100ustar00rootroot00000000000000 # @codemirror/lang-wast [![NPM version](https://img.shields.io/npm/v/@codemirror/lang-wast.svg)](https://www.npmjs.org/package/@codemirror/lang-wast) [ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lang-wast/blob/main/CHANGELOG.md) ] This package implements WebAssembly Text Format language support for the [CodeMirror](https://codemirror.net/) code editor. The [project page](https://codemirror.net/) has more information, a number of [examples](https://codemirror.net/examples/) and the [documentation](https://codemirror.net/docs/). This code is released under an [MIT license](https://github.com/codemirror/lang-wast/tree/main/LICENSE). We aim to be an inclusive, welcoming community. To make that explicit, we have a [code of conduct](http://contributor-covenant.org/version/1/1/0/) that applies to communication around the project. ## API Reference
wast() → LanguageSupport
wastLanguage: LRLanguage
lang-wast-6.0.1/package.json000066400000000000000000000016601432547703300157140ustar00rootroot00000000000000{ "name": "@codemirror/lang-wast", "version": "6.0.1", "description": "WebAssembly Text Format support for the CodeMirror code editor", "scripts": { "test": "cm-runtests", "prepare": "cm-buildhelper src/wast.ts" }, "keywords": [ "editor", "code", "wast" ], "author": { "name": "Marijn Haverbeke", "email": "marijnh@gmail.com", "url": "http://marijnhaverbeke.nl" }, "type": "module", "main": "dist/index.cjs", "exports": { "import": "./dist/index.js", "require": "./dist/index.cjs" }, "types": "dist/index.d.ts", "module": "dist/index.js", "sideEffects": false, "license": "MIT", "dependencies": { "@lezer/highlight": "^1.0.0", "@codemirror/language": "^6.0.0", "@lezer/lr": "^1.0.0" }, "devDependencies": { "@codemirror/buildhelper": "^0.1.5" }, "repository": { "type": "git", "url": "https://github.com/codemirror/lang-wast.git" } } lang-wast-6.0.1/src/000077500000000000000000000000001432547703300142125ustar00rootroot00000000000000lang-wast-6.0.1/src/README.md000066400000000000000000000021171432547703300154720ustar00rootroot00000000000000 # @codemirror/lang-wast [![NPM version](https://img.shields.io/npm/v/@codemirror/lang-wast.svg)](https://www.npmjs.org/package/@codemirror/lang-wast) [ [**WEBSITE**](https://codemirror.net/6/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lang-wast/blob/main/CHANGELOG.md) ] This package implements WebAssembly Text Format language support for the [CodeMirror](https://codemirror.net/6/) code editor. The [project page](https://codemirror.net/6/) has more information, a number of [examples](https://codemirror.net/6/examples/) and the [documentation](https://codemirror.net/6/docs/). This code is released under an [MIT license](https://github.com/codemirror/lang-wast/tree/main/LICENSE). We aim to be an inclusive, welcoming community. To make that explicit, we have a [code of conduct](http://contributor-covenant.org/version/1/1/0/) that applies to communication around the project. ## API Reference @wast @wastLanguage lang-wast-6.0.1/src/wast.grammar000066400000000000000000000020621432547703300165400ustar00rootroot00000000000000@skip { whitespace | LineComment | BlockComment } @top Module { expression* } expression[@isGroup=Expression] { App { "(" expression* ")" } | Identifier | Type | Keyword | Number | String } Type { @specialize } @tokens { idChar { $[0-9A-Za-z!#$%&'*+\-./:<=>?@\^_`|~] } Keyword { $[a-z] idChar* } Identifier { "$" idChar+ } digit { $[0-9] } digits { digit ("_"? digit)* } hexDigit { $[0-9a-fA-F] } hexDigits { hexDigit ("_"? hexDigit)* } Number { $[+-]? ( digits ("." digits?)? ($[eE] $[+-]? digits)? | "0x" hexDigits ("." hexDigits?)? ($[pP] $[+-]? hexDigits)? ) } String { '"' (!["\\] | "\\" _)* '"' } LineComment { ";;" ![\n]* } blockCommentRest { ![;] blockCommentRest | ";" blockCommentSemi } blockCommentSemi { ![);] blockCommentRest | ";" blockCommentSemi | ")" } BlockComment { "(;" blockCommentRest } whitespace { $[ \n\r\t] } "(" ")" } @detectDelim lang-wast-6.0.1/src/wast.grammar.d.ts000066400000000000000000000001111432547703300174000ustar00rootroot00000000000000import {LRParser} from "@lezer/lr" export declare const parser: LRParser lang-wast-6.0.1/src/wast.ts000066400000000000000000000020201432547703300155320ustar00rootroot00000000000000import {delimitedIndent, indentNodeProp, foldNodeProp, foldInside, LRLanguage, LanguageSupport} from "@codemirror/language" import {styleTags, tags as t} from "@lezer/highlight" import {parser} from "./wast.grammar" export const wastLanguage = LRLanguage.define({ name: "wast", parser: parser.configure({ props: [ indentNodeProp.add({ App: delimitedIndent({closing: ")", align: false}) }), foldNodeProp.add({ App: foldInside, BlockComment(tree) { return {from: tree.from + 2, to: tree.to - 2} } }), styleTags({ Keyword: t.keyword, Type: t.typeName, Number: t.number, String: t.string, Identifier: t.variableName, LineComment: t.lineComment, BlockComment: t.blockComment, "( )": t.paren }) ] }), languageData: { commentTokens: {line: ";;", block: {open: "(;", close: ";)"}}, closeBrackets: {brackets: ["(", '"']} } }) export function wast() { return new LanguageSupport(wastLanguage); }