diff options
| -rw-r--r-- | nomsu_tree.moon | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu_tree.moon b/nomsu_tree.moon index 1c41906..c3f33bc 100644 --- a/nomsu_tree.moon +++ b/nomsu_tree.moon @@ -236,8 +236,8 @@ Tree "IndexChain", unless lua.is_value line, src = @value[1].source\get_line!, @value[1].source\get_text! error "#{line}: Cannot index #{colored.yellow src}, since it's not an expression.", 0 - last_char = tostring(lua)\sub(-1,-1) - if last_char == "}" or last_char == '"' or last_char == "]" + first_char = tostring(lua)\sub(1,1) + if first_char == "{" or first_char == '"' or first_char == "[" lua\parenthesize! for i=2,#@value |
