From d63d8b6f0c0a43a14de9493f1683a209a0166889 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 25 Aug 2020 20:17:03 +0200 Subject: 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 --- parser.y | 1 + 1 file changed, 1 insertion(+) (limited to 'parser.y') diff --git a/parser.y b/parser.y index eab4583..204b091 100644 --- a/parser.y +++ b/parser.y @@ -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; } -- cgit v1.2.3