File: __init__.py

package info (click to toggle)
python-tatsu 5.15.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 904 kB
  • sloc: python: 10,128; makefile: 54
file content (8 lines) | stat: -rw-r--r-- 264 bytes parent folder | download | duplicates (4)
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()