Exemplo n.º 1
0
 def setImplements(fcns):
     for fcn in fcns:
         fcn.name = str(fcn.nameStr)
         fcn.impl = getattr(fcn, "implName", None)
         fcn.impl = (str(fcn.impl) if fcn.impl else fcn.impl)
         fcn.line_idx = int(str(fcn.lineNum)) - 1
         fcn.is_generator = str(fcn.isGenerator) == "true"
     for fcn in fcns:
         fcn.is_toplevel = getattr(fcn, "is_toplevel", False) or bool(fcn.impl)
         if fcn.impl:
             try:
                 get_singleton(v for v in fcns if v.name == fcn.impl).is_toplevel = True
             except GetSingletonEmptyException:
                 global couldntfindexception
                 couldntfindexception = True
                 print("couldn't find function %s for file %s" %(fcn.impl, fcn.srcFile))
     return fcns
Exemplo n.º 2
0
 def setImplements(fcns):
     for fcn in fcns:
         fcn.name = str(fcn.nameStr)
         fcn.impl = getattr(fcn, "implName", None)
         fcn.impl = (str(fcn.impl) if fcn.impl else fcn.impl)
         fcn.line_idx = int(str(fcn.lineNum)) - 1
         fcn.is_generator = str(fcn.isGenerator) == "true"
     for fcn in fcns:
         fcn.is_toplevel = getattr(fcn, "is_toplevel", False) or bool(
             fcn.impl)
         if fcn.impl:
             try:
                 get_singleton(v for v in fcns
                               if v.name == fcn.impl).is_toplevel = True
             except GetSingletonEmptyException:
                 global couldntfindexception
                 couldntfindexception = True
                 print("couldn't find function %s for file %s" %
                       (fcn.impl, fcn.srcFile))
     return fcns
Exemplo n.º 3
0
def get_sketch_version(proj_path):
    return get_singleton(
        proj_path.subpath("configure.ac").grep(
            re.compile("AC_INIT\(\w+, ([0-9\.]+),"))).group(1)
Exemplo n.º 4
0
def get_sketch_version(proj_path):
    return get_singleton(proj_path.subpath("configure.ac").grep(
        re.compile("AC_INIT\(\w+, ([0-9\.]+),"))).group(1)