A tree-sitter implemenation for PowerShell.
See LICENSE.
Parse the big test file from EditorSyntax completely.
- Add tree-sitter tests
- Add support for more syntax:
- Statements
switchfilterusingthrowforforeachdo/while/untilexit/returnbreak/continuetraptry/catch/finallydataworkflow/parallel/sequenceconfiguration
- Expressions
-not- Unary
- -ge,-gt,-le,-lt,-eq,-ne,-ceq,-ieq, etc.+,-,*,/,%,-or,-and,-bor,-band, etc.- Element access (
$x[$i])
- Other syntax
- Labels
- Better whitespace handling
- Herestrings
#requires#sig- Pipeline redirection and jobs
- Splatting
&&/||
- Statements
- Investigate possibility of dynamic keyword support
90%+ compatibility with the PowerShell parser today.
npm installnpm start file.ps1
If you want to just generate the parser, run npm run generate.
If you want to just parse a script, run npm run parse file.ps1