]> mj.ucw.cz Git - eval.git/commitdiff
Fixed invalidating conditions and chained condition parsing
authorTomas Gavenciak <gavento@matfyz.cz>
Sat, 29 May 2010 16:42:04 +0000 (12:42 -0400)
committerTomas Gavenciak <gavento@matfyz.cz>
Sat, 29 May 2010 16:42:04 +0000 (12:42 -0400)
t/moe/conf.py
t/moe/confparser.py

index 9d697af68673f46effdab3ca96df7348907a3d6e..3f145c87ebae9b095a9c8024c914037943085f81 100644 (file)
@@ -95,7 +95,7 @@ class ConfigElem(object):
     """
     check_depth(depth)
     if self.cached:
-      log.debug('invalidating %r', self.name)
+      log.debug('invalidating %s', self)
       self.cached = False
       for d in self.dependants:
        d.invalidate(depth + 1)
index de4a515db5666c06dcf9478a701c352600704972..e6ff5660182f8d11c5e626de4187764dbd7996f1 100644 (file)
@@ -240,10 +240,11 @@ class ConfigParser(object):
   def p_CONDITION(self):
     self.dbg() # Debug
     self.p_WS()
+    t = u"condition at %s:%d:%d"%(self.fname, self.line, self.column)
     self.expect(self.c_if)
     self.p_WS()
     f = self.p_FORMULA()
-    cnd = conf.ConfigCondition(f)
+    cnd = conf.ConfigCondition(f, text=t, parent=(self.conditions and self.conditions[-1]) or None)
     self.conditions.append(cnd)
     # Parse a block
     self.p_WS()