Пример #1
0
 def arg_decl_identifier(state, p):
     if len(p) == 4:
         return ast.VarDeclPartial(p[1].getstr(),
                                   p[2],
                                   None,
                                   p[3],
                                   srcpos=sr(p))
     else:
         return ast.VarDeclPartial(p[1].getstr(),
                                   p[4],
                                   p[3],
                                   p[5],
                                   srcpos=sr(p))
Пример #2
0
 def arg_decl_empty(state, p):
     return ast.VarDeclPartial(None, None, None, None, srcpos=(0, 0))
Пример #3
0
 def var_decl_identifier(state, p):
     return ast.VarDeclPartial([p[1].getstr()] + p[2].get_names())
Пример #4
0
 def var_decl_identifier(state, p):
     return ast.VarDeclPartial(p[1].getstr(), p[2], p[3], srcpos=sr(p))
Пример #5
0
 def var_decl_empty(state, p):
     return ast.VarDeclPartial([])