diff --git a/src/caosadvancedtools/models/parser.py b/src/caosadvancedtools/models/parser.py index adf08392ed2ea235a1a869ccb0ab38c8575fc106..654727d0a93253858bcdf25058f5535363ec65a1 100644 --- a/src/caosadvancedtools/models/parser.py +++ b/src/caosadvancedtools/models/parser.py @@ -35,8 +35,10 @@ KEYWORDS = ["parent", # TODO: can we remove that, see: #36 "suggested_properties", "inherit_from_recommended", "inherit_from_suggested", - "inherit_from_obligatory", ] + "inherit_from_obligatory", + "role", ] +# TODO: check whether it's really ignored # These KEYWORDS are not forbidden as properties, but merely ignored. KEYWORDS_IGNORED = [ "unit", @@ -109,6 +111,10 @@ def parse_model_from_string(string): class Parser(object): def __init__(self): + """ + Initialize an empty parer object and initialize + the dictionary of entities and the list of treated elements. + """ self.model = {} self.treated = [] @@ -233,6 +239,8 @@ class Parser(object): """ adds names of Properties and RecordTypes to the model dictionary Properties are also initialized. + + name is the key of the yaml element and definition the value. """ if name == "__line__":