mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
Instead of using Python's inheritance mechanism to define enum nodes, the new mechanism requires adding enum_node = True to the class' body. Inheritance can now be used to make the enum node derive from any subclass of ASTNode instead ASTNode itself.
Python parser
This is a Python parser written on top of Langkit. It is meant as a full example of what can be done with Langkit in terms of parsing, besides Libadalang itself.
Build
$ ./manage.py make
Parse python
build/bin/parse -f my_python_file.py