javascript.py 369 B

12345678910111213141516
  1. from word_processor.parsers import Parser
  2. class JavascriptParser(Parser):
  3. def __init__(self, **kwargs):
  4. super().__init__(**kwargs)
  5. def parse_word(self, word: str):
  6. return word.text.title()
  7. def parse_words(self, words: [str]):
  8. parsed_words = super().parse_words(words)
  9. parsed_words.reverse()
  10. return parsed_words