Permalink
Browse files

Comments about ${!a}

  • Loading branch information...
Andy Chu
Andy Chu committed Aug 10, 2017
1 parent 37d5490 commit 32df376620feb598c1c00aa3985c5c318e20fe40
Showing with 6 additions and 0 deletions.
  1. +6 −0 core/word_eval.py
View
@@ -435,6 +435,12 @@ def _ApplyPrefixOp(self, val, op_id):
length = len(val.strs)
return runtime.Str(str(length))
elif op_id == Id.VSub_Bang:
# NOTES:
# - Could translate to eval('$' + name) or eval("\$$name")
# - ${!array[@]} means something completely different. TODO: implement that.
# - It might make sense to suggest implementing this with associative
# arrays?
# Treat the value of the variable as a variable name.
return self.mem.GetVar(val.s)
else:

0 comments on commit 32df376

Please sign in to comment.