def _get_args()

in o2a/o2a_libs/src/o2a_lib/el_parser.py [0:0]


def _get_args(tree: Tree, fun_mod: str) -> tuple:
    args = []

    register = False
    for child in tree.children:
        if isinstance(child, Token) and child.type == "LPAR":
            register = True
            continue

        if isinstance(child, Token) and child.type == "LPAR":
            break

        if isinstance(child, Token) and child.value in (",", ")"):
            continue

        if register:
            args.append(_translate_el(child, fun_mod))

    return tuple(args)