diff --git a/_pages/grammar.md b/_pages/grammar.md index 37bb1ba..b602dfd 100644 --- a/_pages/grammar.md +++ b/_pages/grammar.md @@ -28,10 +28,9 @@ laststat = 'return' [explist] | 'break' | 'continue' funcname = NAME {'.' NAME} [':' NAME] funcbody = ['<' GenericTypeList '>'] '(' [parlist] ')' [':' ReturnType] block 'end' -parlist = bindinglist [',' '...' [':' GenericTypePack | Type]] +parlist = bindinglist [',' '...' [':' (GenericTypePack | Type)]] | '...' [':' (GenericTypePack | Type)] explist = {exp ','} exp -namelist = NAME {',' NAME} binding = NAME [':' Type] bindinglist = binding [',' bindinglist] (* equivalent of Lua 5.1 'namelist', except with optional type annotations *)