Ejemplo n.º 1
0
    def parse(self, left, token, right, parser):
        right_side = parser.expression(self.precedence)

        return PartialList([self.representation(),
                            list.close_partial_lists(left),
                            list.close_partial_lists(right_side)])
Ejemplo n.º 2
0
    def parse(self, token, right, parser):
        within = parser.expression(self.precedence)
        if right.peek().purpose == "endline":
            right.next()

        return list.close_partial_lists(within)
Ejemplo n.º 3
0
    def parse(self, token, right, parser):
        within = parser.expression(self.precedence)
        within = list.close_partial_lists(within)

        return PartialList([within])
Ejemplo n.º 4
0
 def parse(self, token, right, parser):
     within = parser.expression(self.precedence)
     within = list.close_partial_lists(within)
     return List([self.representation(), within])