Shell parser/AST for POSIX/Bash/mksh/zsh, in TypeScript
Something went wrong. Try again.
feat: parse Bash extended glob patterns (?(, *(, +(, @(, !() master
Adds an `ExtGlob` word part with `op` and a raw `pattern` string (alternations and nested groups stay unparsed inside the pattern). Implementation lives in tokenizer/scan-extglob.ts and is invoked from the word loop before `(` is treated as a word terminator. The negation operator at a statement boundary now defers to the extended-glob scanner when followed by `(`, matching Bash semantics. Tests cover all five operators, alternation, nested parens, position tracking, and confirm a bare `?` stays a literal.
Author Aliou Diallo Date (May 25, 2026, 11:01 AM UTC) Commit 84f233bd 84f233bdcaea463f6db656cbf5a27e39b45c42ac Parent d3de1d46 d3de1d467528075b39d6473278dd1282495c963c