Permalink
Please sign in to comment.
Browse files
Lex and parse extended globs.
Add more tests too. We're not executing/matching them yet. This required a new lexer mode LexMode.EXTGLOB and a new token kind Kind.ExtGlob. Note: I ran into an ambiguity with [[ !(1 == 2) ]], and solved it by defining it away. See doc/osh-manual.md. [[ ! (1 == 2) ]] with a space is the correct syntax for a boolean expression. We have a simpler rule than Bash for this corner case. shopt -s extglob is a no-op. Unrelated: - Add a test case for the BASH_REGEX lexer mode.
- Loading branch information...
Showing
with
217 additions
and 14 deletions.
- +3 −0 core/id_kind.py
- +1 −1 core/word_eval.py
- +19 −3 doc/osh-manual.md
- +27 −4 osh/lex.py
- +39 −1 osh/lex_test.py
- +1 −1 osh/osh.asdl
- +63 −2 osh/word_parse.py
- +1 −1 spec/dbracket.test.sh
- +56 −0 spec/extended-glob.test.sh
- +6 −0 spec/regex.test.sh
- +1 −1 test/spec.sh
0 comments on commit
4e64a4d