from bb.utils import better_compile, better_exec
from bb import error
-# A dict of modules we have handled
-# it is the number of .bbclasses + x in size
-_parsed_methods = { }
+# A dict of function names we have seen
_parsed_fns = { }
def insert_method(modulename, code, fn):
else:
_parsed_fns[name] = modulename
+# A dict of modules the parser has finished with
+_parsed_methods = {}
+
def parsed_module(modulename):
"""
- Inform me file xyz was parsed
+ Has module been parsed?
"""
return modulename in _parsed_methods
-
-def get_parsed_dict():
+def set_parsed_module(modulename):
"""
- shortcut
+ Set module as parsed
"""
- return _parsed_methods
+ _parsed_methods[modulename] = True
+
from bb import methodpool
from bb.parse import logger
-__parsed_methods__ = bb.methodpool.get_parsed_dict()
_bbversions_re = re.compile(r"\[(?P<from>[0-9]+)-(?P<to>[0-9]+)\]")
class StatementGroup(list):
# we have parsed the bb class now
if ext == ".bbclass" or ext == ".inc":
- bb.methodpool.get_parsed_dict()[base_name] = 1
+ bb.methodpool.set_parsed_module(base_name)
return d