Created
July 24, 2017 18:42
-
-
Save 166MMX/5c03ac2c6d589a954ab6a9b7681382ef to your computer and use it in GitHub Desktop.
Python to Groovy syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^(?!\n)(\s*)#/ => '$1//' | |
/u"(([^"]|\\")*)"/ => "'$1'" | |
/(if|while|for|elif|except)\s+([^\n{]+):/ => '$1 ($2):' | |
/:\s*\n((\s+)[^\n]*?\n+(\n*\2[^\n]*\n)*)/ => '{\n$1}' | |
/raise/ => 'throw new' | |
/except/ => 'catch' | |
/elif/ => 'else if' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment