Ejemplo n.º 1
0
 def _token_led_lparen(self, left):
     name = left['value']
     args = []
     while not self._current_token() == 'rparen':
         if self._current_token() == 'current':
             expression = ast.current_node()
             self._advance()
         else:
             expression = self._expression()
         if self._current_token() == 'comma':
             self._match('comma')
         args.append(expression)
     self._match('rparen')
     function_node = ast.function_expression(name, args)
     return function_node
Ejemplo n.º 2
0
 def _token_led_lparen(self, left):
     name = left['value']
     args = []
     while not self._current_token() == 'rparen':
         if self._current_token() == 'current':
             expression = ast.current_node()
             self._advance()
         else:
             expression = self._expression()
         if self._current_token() == 'comma':
             self._match('comma')
         args.append(expression)
     self._match('rparen')
     function_node = ast.function_expression(name, args)
     return function_node
Ejemplo n.º 3
0
 def _token_nud_current(self, token):
     return ast.current_node()
Ejemplo n.º 4
0
 def _token_nud_current(self, token):
     return ast.current_node()