File: __init__.py

package info (click to toggle)
python-tatsu 5.13.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 892 kB
  • sloc: python: 10,202; makefile: 54
file content (8 lines) | stat: -rw-r--r-- 264 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
from ..objectmodel import ParseModel
from .python import PythonCodeGenerator


def codegen(model: ParseModel, parser_name: str = '') -> str:
    generator = PythonCodeGenerator(parser_name=parser_name)
    generator.walk(model)
    return generator.printed_text()