Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 def value(self, node):
     return Text(MappingRule.value(self, node))
Exemplo n.º 5
0
 def value(self, node):
   return Text(MappingRule.value(self, node))