Tree-sitter parser for Action Script

April 15, 2023 ยท View on GitHub

Inspired from jcs090218/tree-sitter-actionscript and the official javascript grammar for tree-sitter.

This grammar is tailored for parsing results of jpexs-decompiler, so it may include non standard grammar and quirky stuff.

Development

Setup

yarn install

Build

yarn build

Then you can parse a file using

tree-sitter parse file.as

Testing

There is a corpus of test in the test directory.

To run the grammar against the corpus use:

yarn test
# OR, to build then test
yarn build-test

Production

Use one of the binding for tree sitter to use this grammar in an external software, for example the python bindings.