예제 #1
0
 def value(self, node):
     value = MappingRule.value(self, node)
     if value == 'tcomment':
         # ugly hack to get around tComment's not allowing ranges with gcc.
         value = node.children[0].children[0].children[0].children[1].value()
         if value in (1, '1', None):
             return Text('gcc')
         else:
             return Text('gc%dj' % (int(value) - 1))
     else:
         return value
예제 #2
0
 def value(self, node):
     value = MappingRule.value(self, node)
     if value == 'tcomment':
         # ugly hack to get around tComment's not allowing ranges with gcc.
         value = node.children[0].children[0].children[0].children[1].value()
         if value in (1, '1', None):
             return Text('gcc')
         else:
             return Text('gc%dj' % (int(value) - 1))
     else:
         return value
예제 #3
0
파일: operators.py 프로젝트: jesboat/aenea
 def value(self, node):
   value = MappingRule.value(self, node)
   if value == "tcomment":
     try:
       # ugly hack to get around tComment's not allowing ranges with gcc.
       value = node.children[0].children[0].children[0].children[1].value()
       if value in (1, "1", None):
         return Text("gcc")
       else:
         return Text("gc%dj" % (int(value) - 1))
     except Exception, ex:
       print ex
예제 #4
0
 def value(self, node):
     return Text(MappingRule.value(self, node))
예제 #5
0
 def value(self, node):
   return Text(MappingRule.value(self, node))