(predefined_types=None)
return [scope]
Generate CParser scope_stack argument to parse method
Generate CParser scope_stack argument to parse method
Generate CParser scope_stack argument to parse method
def _make_scope(predefined_types=None):
    """
    Generate CParser scope_stack argument to parse method
    """
    all_types = ChainMap(predefined_types or {}, ALL_TYPES)
    scope = dict()
    for ty in all_types:
        if ty in BASIC_TYPES:
            continue
        if ' ' in ty:
            continue

        typ = all_types[ty]
        if type(typ) is TypeRef:
            typ = typ.type
        if isinstance(typ, (SimTypeFunction,SimTypeString, SimTypeWString)):
            continue

        scope[ty] = True
    return [scope]
def _make_scope ( predefined_types = None ) : all_types = ChainMap ( predefined_types or { } , ALL_TYPES ) scope = dict ( ) for ty in all_types : if ty in BASIC_TYPES : continue if ' ' in ty : continue typ = all_types [ ty ] if type ( typ ) is TypeRef : typ = typ . type if isinstance ( typ , ( SimTypeFunction , SimTypeString , SimTypeWString ) ) : continue scope [ ty ] = True return [ scope ]