Skip to content

Commit

Permalink
table indexers can only appear once per table type (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: ariel <aaronweiss@roblox.com>
  • Loading branch information
jackdotink and aatxe authored Feb 24, 2025
1 parent d852d00 commit 75d9b76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _pages/grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ TypePack = '(' [TypeList] ')'
GenericTypePack = NAME '...'
VariadicTypePack = '...' Type
ReturnType = Type | TypePack | GenericTypePack | VariadicTypePack
TableIndexer = '[' Type ']' ':' Type
TableProp = NAME ':' Type
TablePropOrIndexer = ['read' | 'write'] (TableProp | TableIndexer)
PropList = TablePropOrIndexer {fieldsep TablePropOrIndexer} [fieldsep]
TableIndexer = ['read' | 'write'] '[' Type ']' ':' Type
TableProp = ['read' | 'write'] NAME ':' Type
PropList = TableProp [fieldsep PropList] | TableIndexer {fieldsep TableProp}
TableType = '{' Type '}' | '{' [PropList] '}'
FunctionType = ['<' GenericTypeList '>'] '(' [BoundTypeList] ')' '->' ReturnType
```

0 comments on commit 75d9b76

Please sign in to comment.