I've been recovering from what was hopefully not coronavirus and wanting to do some programming without actually returning to my day job just yet, so here I am.
Like python's f strings and JavaScript's template strings, I wrote some changes to Parser.java to achieve the same thing for ASH. If you use backticks (`) to define a string, you can then use curly braces to concatenate expressions in a fashion that's a little more fluent and terse.
For example:
I've tested it extensively, including various combinations of escaped tokens but still posting a patch here before I commit it to gauge if it's a desired feature as much as to sense check the code itself
Like python's f strings and JavaScript's template strings, I wrote some changes to Parser.java to achieve the same thing for ASH. If you use backticks (`) to define a string, you can then use curly braces to concatenate expressions in a fashion that's a little more fluent and terse.
For example:
Code:
print(`Hello, {my_name()}! How are you doing today?`);
visit_url(`choice.php?pwd=&whichchoice=1395&pwd&option={pill}`);
I've tested it extensively, including various combinations of escaped tokens but still posting a patch here before I commit it to gauge if it's a desired feature as much as to sense check the code itself