Skip to content

Commit df8ef13

Browse files
committed
Housekeep
1 parent 799c830 commit df8ef13

4 files changed

Lines changed: 18 additions & 10 deletions

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ node bench/all.ts
112112

113113
## Size
114114

115-
unbash is under 50K minified, 12KB gzipped.
115+
unbash is 53K minified, 13KB gzipped.
116+
117+
## Playgrounds
118+
119+
- [unbash-playground.statichost.page][6]
120+
- [ast-explorer.dev][7]
116121

117122
## License
118123

@@ -123,3 +128,5 @@ ISC
123128
[3]: https://github.com/mvdan/sh
124129
[4]: https://github.com/vorpaljs/bash-parser
125130
[5]: https://github.com/ericcornelissen/bash-parser
131+
[6]: https://unbash-playground.statichost.page
132+
[7]: https://ast-explorer.dev/#eNoVjDsKwzAQRK8yDK5CyAGS2nVAId02jixZAbFr/Kls393rbh7zeBsrn5xLqpV3jr5X/XVzcYgOKRaD8LoNzffTBqFotgkZf8XtUW14oTdRIHaLq00WYscwpRFtCO8g2psm75n3toPHCdz+Ivg=

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
"name": "unbash",
33
"version": "2.1.0",
44
"description": "Fast 0-deps bash parser written in TypeScript",
5+
"keywords": [
6+
"ast",
7+
"bash",
8+
"lexer",
9+
"parser",
10+
"posix",
11+
"scanner",
12+
"tokenizer",
13+
"typescript"
14+
],
515
"license": "ISC",
616
"author": {
717
"name": "Lars Kappert",

src/lexer.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ export class Lexer {
323323
private current: TokenValue;
324324
private nextState: TokenValue;
325325
private hasPeek: boolean;
326-
// Removed parseFn
327326
private pendingHereDocs: PendingHereDoc[];
328327
private collectedExpansions: DeferredCommandExpansion[];
329328
_errors: ParseError[] | null = null;
@@ -344,8 +343,6 @@ export class Lexer {
344343
}
345344
}
346345

347-
// Removed setParser
348-
349346
get errors(): ParseError[] {
350347
return this._errors ?? (this._errors = []);
351348
}

src/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ export interface Word {
66
parts?: WordPart[];
77
}
88

9-
// Word part types
10-
119
export interface LiteralPart {
1210
type: "Literal";
1311
value: string;
@@ -91,8 +89,6 @@ export interface BraceExpansionPart {
9189
text: string;
9290
}
9391

94-
// Arithmetic expression types
95-
9692
export type ArithmeticExpression =
9793
| ArithmeticBinary
9894
| ArithmeticUnary
@@ -326,8 +322,6 @@ export interface ArithmeticFor {
326322
body: CompoundList;
327323
}
328324

329-
// Test expression types (for [[ ]])
330-
331325
export type TestExpression =
332326
| TestUnaryExpression
333327
| TestBinaryExpression

0 commit comments

Comments
 (0)