+7
-0
@@ -13,3 +13,10 @@ import type { Word, WordPart } from "./types.ts"; | ||
| set parts(v: WordPart[] | undefined); | ||
| toJSON(): { | ||
| text: string; | ||
| pos: number; | ||
| end: number; | ||
| parts: WordPart[] | undefined; | ||
| value: string; | ||
| }; | ||
| } | ||
| export {}; |
+3
-0
@@ -60,2 +60,5 @@ function dequoteValue(parts) { | ||
| } | ||
| toJSON() { | ||
| return { text: this.text, pos: this.pos, end: this.end, parts: this.parts, value: this.value }; | ||
| } | ||
| } |
+12
-2
| { | ||
| "name": "unbash", | ||
| "version": "2.1.0", | ||
| "version": "2.2.0", | ||
| "description": "Fast 0-deps bash parser written in TypeScript", | ||
| "keywords": [ | ||
| "ast", | ||
| "bash", | ||
| "lexer", | ||
| "parser", | ||
| "posix", | ||
| "scanner", | ||
| "tokenizer", | ||
| "typescript" | ||
| ], | ||
| "license": "ISC", | ||
@@ -34,3 +44,3 @@ "author": { | ||
| "test": "node --test test/*.test.ts", | ||
| "playground": "npx rolldown src/parser.ts -f esm -m -o playground/parser.js && npx rolldown src/printer.ts -f esm -m -o playground/printer.js" | ||
| "playground": "npx rolldown src/parser.ts -f esm -m -o playground/parser.js && npx rolldown src/printer.ts -f esm -m -o playground/printer.js && sed -i 's/id=\"version\">[^<]*/id=\"version\">'\"$(node -p \"require('.\\x2fpackage.json').version\")\"'/' playground/index.html" | ||
| }, | ||
@@ -37,0 +47,0 @@ "devDependencies": { |
+8
-1
@@ -115,4 +115,9 @@ # unbash | ||
| unbash is under 50K minified, 12KB gzipped. | ||
| unbash is 53K minified, 13KB gzipped. | ||
| ## Playgrounds | ||
| - [unbash-playground.statichost.page][6] | ||
| - [ast-explorer.dev][7] | ||
| ## License | ||
@@ -127,1 +132,3 @@ | ||
| [5]: https://github.com/ericcornelissen/bash-parser | ||
| [6]: https://unbash-playground.statichost.page | ||
| [7]: https://ast-explorer.dev/#eNoVjDsKwzAQRK8yDK5CyAGS2nVAId02jixZAbFr/Kls393rbh7zeBsrn5xLqpV3jr5X/XVzcYgOKRaD8LoNzffTBqFotgkZf8XtUW14oTdRIHaLq00WYscwpRFtCO8g2psm75n3toPHCdz+Ivg= |
Sorry, the diff of this file is too big to display
174524
0.46%4919
0.16%133
5.56%