src/pybel/tokens.py
def parse_result_to_dsl(tokens) -> BaseEntity:
    """Convert a ParseResult to a PyBEL DSL object.

    :type tokens: dict or pyparsing.ParseResults
    """
    # if MODIFIER in tokens:
    #     return parse_result_to_dsl(tokens[TARGET])
    if REACTION == tokens[FUNCTION]:
        return _reaction_po_to_dict(tokens)

    elif VARIANTS in tokens:
        return _variant_po_to_dict(tokens)

    elif MEMBERS in tokens:
        if CONCEPT in tokens:
            return _list_po_with_concept_to_dict(tokens)
        return _list_po_to_dict(tokens)

    elif FUSION in tokens:
        return _fusion_to_dsl(tokens)

    return _simple_po_to_dict(tokens)
Convert a ParseResult to a PyBEL DSL object.

    :type tokens: dict or pyparsing.ParseResults
    
Convert a ParseResult to a PyBEL DSL object.
Convert a ParseResult to a PyBEL DSL object .
def parse_result_to_dsl(tokens) -> BaseEntity:
    if REACTION == tokens[FUNCTION]:
        return _reaction_po_to_dict(tokens)
    elif VARIANTS in tokens:
        return _variant_po_to_dict(tokens)
    elif MEMBERS in tokens:
        if CONCEPT in tokens:
            return _list_po_with_concept_to_dict(tokens)
        return _list_po_to_dict(tokens)
    elif FUSION in tokens:
        return _fusion_to_dsl(tokens)
    return _simple_po_to_dict(tokens)
def parse_result_to_dsl ( tokens ) -> BaseEntity : if REACTION == tokens [ FUNCTION ] : return _reaction_po_to_dict ( tokens ) elif VARIANTS in tokens : return _variant_po_to_dict ( tokens ) elif MEMBERS in tokens : if CONCEPT in tokens : return _list_po_with_concept_to_dict ( tokens ) return _list_po_to_dict ( tokens ) elif FUSION in tokens : return _fusion_to_dsl ( tokens ) return _simple_po_to_dict ( tokens )
Convert a ParseResult to a PyBEL DSL object.
Convert a ParseResult to a PyBEL DSL object .
"""Convert a ParseResult to a PyBEL DSL object.

    :type tokens: dict or pyparsing.ParseResults
    """ # if MODIFIER in tokens: #     return parse_result_to_dsl(tokens[TARGET])
tokens