def foreach_node():
    node = _start_node
    while node:
        if (node.type == NodeType.STRING):
            char_key = str(node)
            while True:
                node = node.next
                if ((char_key == str(node)) and (get_forward_char(node, 2)[0] != '\\')):
                    merge_prev_node(node)
                    break
                if (not node.next):
                    break
                merge_prev_node(node)
        str_node = str(node)
        if ((str_node == (len(str_node) * '=')) and (str(node.last) == '[') and (str(node.next) == '[')):
            end_flag = (']%s]' % (len(str_node) * '='))
            node = merge_prev_node(node)
            node.type = NodeType.COMMENT_SINGLE
            while True:
                node = node.next
                merge_prev_node(node)
                if (get_forward_char(node, len(end_flag)) == end_flag):
                    break
                if (not node.next):
                    break
        if (get_forward_char(node, 2) == '[['):
            node = merge_prev_node(node)
            node.type = NodeType.STRING
            while True:
                node = node.next
                node.type = NodeType.STRING
                if (get_forward_char(node, 2) == ']]'):
                    node = merge_prev_node(node)
                    break
                merge_prev_node(node)
                if (not node.next):
                    break
        if (get_forward_char(node, 2) == '--'):
            node.type = NodeType.COMMENT_SINGLE
            while True:
                node = node.next
                if (node.type == NodeType.ENTER):
                    break
                if (not node.next):
                    break
                tmp = merge_prev_node(node)
                str_tmp = str(tmp)
                check_flag = ('--[%s[' % ((len(str_tmp) - 4) * '='))
                end_flag = (']%s]' % ((len(str_tmp) - 4) * '='))
                if (str(tmp) == check_flag):
                    node = tmp
                    while True:
                        node = node.next
                        if (get_forward_char(node, len(end_flag)) == end_flag):
                            merge_prev_node(node)
                            break
                        merge_prev_node(node)
                        if (not node.next):
                            break
                    break
        node = node.next
def foreach_node():
    node = _start_node
    while node:
        if (node.type == NodeType.STRING):
            char_key = str(node)
            while True:
                node = node.next
                if ((char_key == str(node)) and (get_forward_char(node, 2)[0] != '\\')):
                    merge_prev_node(node)
                    break
                if (not node.next):
                    break
                merge_prev_node(node)
        str_node = str(node)
        if ((str_node == (len(str_node) * '=')) and (str(node.last) == '[') and (str(node.next) == '[')):
            end_flag = (']%s]' % (len(str_node) * '='))
            node = merge_prev_node(node)
            node.type = NodeType.COMMENT_SINGLE
            while True:
                node = node.next
                merge_prev_node(node)
                if (get_forward_char(node, len(end_flag)) == end_flag):
                    break
                if (not node.next):
                    break
        if (get_forward_char(node, 2) == '[['):
            node = merge_prev_node(node)
            node.type = NodeType.STRING
            while True:
                node = node.next
                node.type = NodeType.STRING
                if (get_forward_char(node, 2) == ']]'):
                    node = merge_prev_node(node)
                    break
                merge_prev_node(node)
                if (not node.next):
                    break
        if (get_forward_char(node, 2) == '--'):
            node.type = NodeType.COMMENT_SINGLE
            while True:
                node = node.next
                if (node.type == NodeType.ENTER):
                    break
                if (not node.next):
                    break
                tmp = merge_prev_node(node)
                str_tmp = str(tmp)
                check_flag = ('--[%s[' % ((len(str_tmp) - 4) * '='))
                end_flag = (']%s]' % ((len(str_tmp) - 4) * '='))
                if (str(tmp) == check_flag):
                    node = tmp
                    while True:
                        node = node.next
                        if (get_forward_char(node, len(end_flag)) == end_flag):
                            merge_prev_node(node)
                            break
                        merge_prev_node(node)
                        if (not node.next):
                            break
                    break
        node = node.next