Add support for inline expressions in methods
Created by: huntergoldstein
Changes introduced by this pull request:
- If the "variable" for a string or method looks like an expression (starts with
@
,$
, etc.), it is expanded as if it were an expression, otherwise it is treated as a variable
Drawbacks: I feel like this PR has exacerbated some issues with how methods are parsed, for example:
$ let foo = bar
$ echo @len( @bytes(foo))
0
$ echo $len( foo)
<no output>
I'd like to make a sweep over how methods are parsed and do things like consolidating the logic for all the string methods, making it easier to pass in arbitrary values to methods, making StringMethod
s work exactly like ArrayMethod
s or vice-versa, etc. Also fixing the above.
Fixes: Closes #389 (closed)
State: Good to go aside from Drawbacks