From 82ed4204fab28bcf977e98282060d50e7070704c Mon Sep 17 00:00:00 2001 From: cyberthirst Date: Thu, 21 Mar 2024 16:16:25 +0100 Subject: [PATCH] fix grammar to support tstorage --- vyper/ast/grammar.lark | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vyper/ast/grammar.lark b/vyper/ast/grammar.lark index 1c318a76a5..3feb4df92f 100644 --- a/vyper/ast/grammar.lark +++ b/vyper/ast/grammar.lark @@ -15,6 +15,7 @@ module: ( DOCSTRING | event_def | function_def | immutable_def + | transient_def | exports_decl | _NEWLINE )* @@ -47,9 +48,13 @@ constant_def: (constant_private | constant_with_getter) "=" expr immutable: "immutable" "(" type ")" immutable_def: NAME ":" immutable +// transient definitions +transient: "transient" "(" type ")" +transient_def: NAME ":" transient + variable: NAME ":" type // NOTE: Temporary until decorators used -variable_with_getter: NAME ":" "public" "(" (type | immutable) ")" +variable_with_getter: NAME ":" "public" "(" (type | immutable | transient) ")" variable_def: variable | variable_with_getter // A decorator "wraps" a method, modifying it's context.