diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-08-25 20:17:03 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-08-25 20:38:15 +0200 |
commit | d63d8b6f0c0a43a14de9493f1683a209a0166889 (patch) | |
tree | a025491b84e629194b0b6b1b854606578f4d0079 /parser.y | |
parent | 93902cd86f8244b2036a0e5bd910099da13b6885 (diff) |
treewide: introduce this keyword
Support a new keyword `this` which allows functions to access the context
they're called upon.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -260,6 +260,7 @@ primary_exp(A) ::= T_NUMBER(B). { A = B; } primary_exp(A) ::= T_DOUBLE(B). { A = B; } primary_exp(A) ::= T_STRING(B). { A = B; } primary_exp(A) ::= T_LABEL(B). { A = B; } +primary_exp(A) ::= T_THIS(B). { A = B; } primary_exp(A) ::= array(B). { A = B; } primary_exp(A) ::= object(B). { A = B; } primary_exp(A) ::= T_LPAREN assign_exp(B) T_RPAREN. { A = B; } |