hapy/transpiler.py
def transpile(code: str, local: bool = False, no_indent=False) -> str:
    """transpile .hapy code to python code from string"""
    inputs = InputStream(code)
    tokens = TokenStream(inputs)
    ast = parse(tokens)
    unindented_code = make_py(ast, local)
    # indent python code here...
    if no_indent:
        return unindented_code

    python_code = indent(unindented_code)

    return python_code
transpile .hapy code to python code from string
transpile .hapy code to python code from string
transpile . hapy code to python code from string
def transpile(code: str, local: bool = False, no_indent=False) -> str:
    inputs = InputStream(code)
    tokens = TokenStream(inputs)
    ast = parse(tokens)
    unindented_code = make_py(ast, local)
    if no_indent:
        return unindented_code
    python_code = indent(unindented_code)
    return python_code
def transpile ( code : str , local : bool = False , no_indent = False ) -> str : inputs = InputStream ( code ) tokens = TokenStream ( inputs ) ast = parse ( tokens ) unindented_code = make_py ( ast , local ) if no_indent : return unindented_code python_code = indent ( unindented_code ) return python_code
transpile .hapy code to python code from string
transpile . hapy code to python code from string
"""transpile .hapy code to python code from string""" # indent python code here...
code
str
local
bool
no_indent