Skip to content

Commit

Permalink
fix grammar to support tstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberthirst authored and tserg committed Mar 26, 2024
1 parent f66ade2 commit 82ed420
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vyper/ast/grammar.lark
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module: ( DOCSTRING
| event_def
| function_def
| immutable_def
| transient_def
| exports_decl
| _NEWLINE )*

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 82ed420

Please sign in to comment.