Add casual string representation of named settings and predicates.

Use 'group.setting' format for named predicates, only display the expression
for anonymous predicates.
This commit is contained in:
Jakob Stoklund Olesen
2016-08-31 15:44:36 -07:00
parent 88c8e9a59a
commit de330402b8
2 changed files with 8 additions and 5 deletions

View File

@@ -35,6 +35,9 @@ class Setting(object):
self.byte_offset = None
self.group = SettingGroup.append(self)
def __str__(self):
return '{}.{}'.format(self.group.name, self.name)
def predicate_context(self):
"""
Return the context where this setting can be evaluated as a (leaf)