(self, parser, group)
return newgroup
This filter finds BoostNodes and applies the boost to the previous
        node.
This filter finds BoostNodes and applies the boost to the previous
        node.
This filter finds BoostNodes and applies the boost to the previous node .
def do_boost(self, parser, group):
        """This filter finds BoostNodes and applies the boost to the previous
        node.
        """

        newgroup = group.empty_copy()
        for node in group:
            if isinstance(node, syntax.GroupNode):
                node = self.do_boost(parser, node)
            elif isinstance(node, self.BoostNode):
                if (newgroup and newgroup[-1].has_boost):
                    # Apply the BoostNode's boost to the previous node
                    newgroup[-1].set_boost(node.boost)
                    # Skip adding the BoostNode to the new group
                    continue
                else:
                    node = syntax.to_word(node)
            newgroup.append(node)
        return newgroup
def do_boost ( self , parser , group ) : newgroup = group . empty_copy ( ) for node in group : if isinstance ( node , syntax . GroupNode ) : node = self . do_boost ( parser , node ) elif isinstance ( node , self . BoostNode ) : if ( newgroup and newgroup [ - 1 ] . has_boost ) : # Apply the BoostNode's boost to the previous node newgroup [ - 1 ] . set_boost ( node . boost ) # Skip adding the BoostNode to the new group continue else : node = syntax . to_word ( node ) newgroup . append ( node ) return newgroup