Skip to content

Commit

Permalink
fix: lark grammar for array indexes (#3131)
Browse files Browse the repository at this point in the history
  • Loading branch information
benber86 authored Oct 28, 2022
1 parent 676dc30 commit b13595f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vyper/ast/grammar.lark
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ enum_body: _NEWLINE _INDENT (enum_member _NEWLINE)+ _DEDENT
enum_def: _ENUM_DECL NAME ":" enum_body

// Types
array_def: (NAME | array_def | dyn_array_def) "[" (DEC_NUMBER | NAME) "]"
dyn_array_def: "DynArray" "[" (NAME | array_def | dyn_array_def) "," (DEC_NUMBER | NAME) "]"
array_def: (NAME | array_def | dyn_array_def) "[" _expr "]"
dyn_array_def: "DynArray" "[" (NAME | array_def | dyn_array_def) "," _expr "]"
tuple_def: "(" ( NAME | array_def | dyn_array_def | tuple_def ) ( "," ( NAME | array_def | dyn_array_def | tuple_def ) )* [","] ")"
// NOTE: Map takes a basic type and maps to another type (can be non-basic, including maps)
_MAP: "HashMap"
Expand Down

0 comments on commit b13595f

Please sign in to comment.