def _set_node_metadata(ptr, token, names, lengths):
    """Inplace update of names and lengths given token details"""
    name = None
    length = 0.0
    if token.startswith(':'):
        length = float(token[1:])
    elif ':' in token:
        name, length = token.rsplit(':', 1)
        length = float(length)
        name = name.replace("'", '').replace('"', '')
    else:
        name = token.replace("'", '').replace('"', '')
    names[ptr] = name
    lengths[ptr] = length
