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