예제 #1
0
 def createToken(self, info, parent):
     tokens.Word(parent, content=info[0])
     return parent
예제 #2
0
 def testWord(self):
     token = tokens.Word(content=u"content")
     self.assertEqual(token.content, "content")
예제 #3
0
 def __call__(self, info, parent):
     content = info['content']
     if content == 'throw':
         raise exceptions.TokenizeException("testing")
     return tokens.Word(parent, content=content)
예제 #4
0
 def __call__(self, info, parent):
     return tokens.Word(parent, content=info['content'])