code_tokenize
code_tokenize copied to clipboard
Fast tokenization and structural analysis of any programming language
Consider the following code: ```python3 text = """private void unlockMap(Player player) { TowerData towerData = player.getTowerData(); if (!towerData.getClass().equals(TowerData.class)) { CommandHandler.sendTranslatedMessage(player, "commands.generic.no_permissions"); } else { if (towerData.""" import code_tokenize as ctok...
For the following code ```python import code_tokenize as ctok sample = """ #include int main() { printf("hello world"); } """ ctok.tokenize(sample, lang = "cpp") ``` Output: ```txt [#include, , ,...