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
def _token_nud_current(self, token): return ast.current_node()