Beispiel #1
0
 def p_varargslist20(self, p):
     """varargslist : fpdef EQUAL test varargslist_list COMMA"""
     list_args, list_defaults = p[4]
     args = [p[1]] + list_args
     defaults = [p[3]] + list_defaults
     p[0] = myast.DefArgs(args, defaults, lineno=p.lineno(1))
Beispiel #2
0
 def p_varargslist15(self, p):
     """varargslist : fpdef EQUAL test COMMA"""
     p[0] = myast.DefArgs([p[1]], [p[3]], lineno=p.lineno(1))
Beispiel #3
0
 def p_varargslist5(self, p):
     """varargslist : fpdef COMMA"""
     p[0] = myast.DefArgs([p[1]], [], lineno=p.lineno(1))
Beispiel #4
0
 def p_varargslist10(self, p):
     """varargslist : fpdef varargslist_list COMMA"""
     list_args, defaults = p[2]
     args = [p[1]] + list_args
     p[0] = myast.DefArgs(args, defaults, lineno=p.lineno(2))
Beispiel #5
0
 def p_parameters1(self, p):
     """parameters : LPAR RPAR"""
     p[0] = myast.DefArgs([], [])