baseLanguage.sugar - little additions to base language
I adore ability of MPS to seamlessly extend languages. From this love and my love to Python and Ruby syntax sugar came this project.
Simplistic string format - no more chained string formatting calls, less clutter, more action
Inline 'if' - Ruby style if. 'Do something' if 'condition'
Inline 'unless' - inverted if. 'Do something' unless 'condition'
There is one gotcha with if/unless statements. If you want convert existing statement into "unless/if" statement you need to place your cursor AFTER ending semicolon and start typing respective keyword.
Download distribution package from github
Project page: https://github.com/ushkinaz/language-sugar
Installation instructions is in readme file
Simplistic string format - no more chained string formatting calls, less clutter, more action
string message = "My name is %s, I am %d years old" % "Isaac Newton", 18; assert message equals "My name is Isaac Newton, I am 18 years old";
Inline 'if' - Ruby style if. 'Do something' if 'condition'
int t = 0; t = 5 if t > 0; assert t == 0;
Inline 'unless' - inverted if. 'Do something' unless 'condition'
int t = 0; t = 5 unless t == 0; assert t == 0;
There is one gotcha with if/unless statements. If you want convert existing statement into "unless/if" statement you need to place your cursor AFTER ending semicolon and start typing respective keyword.
Download distribution package from github
Project page: https://github.com/ushkinaz/language-sugar
Installation instructions is in readme file
Please sign in to leave a comment.
So, you can publish your language extensions there as a plugin.