From a8a08d8390a65954eeeb6ff635d445d54870ddc8 Mon Sep 17 00:00:00 2001 From: JohnnyMorganz Date: Sat, 4 Dec 2021 11:33:45 +0000 Subject: [PATCH] Comment that bindinglist is equiv. to namelist --- docs/_pages/grammar.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_pages/grammar.md b/docs/_pages/grammar.md index e4cfbb87..61fb8eea 100644 --- a/docs/_pages/grammar.md +++ b/docs/_pages/grammar.md @@ -7,7 +7,7 @@ toc: true This is the complete syntax grammar for Luau in EBNF. More information about the terminal nodes String and Number is available in the [syntax section](syntax). -``` +```ebnf chunk ::= {stat [`;']} [laststat [`;']] block ::= chunk stat ::= varlist `=' explist | @@ -34,7 +34,7 @@ explist ::= {exp `,'} exp namelist ::= NAME {`,' NAME} binding ::= NAME [`:' TypeAnnotation] -bindinglist ::= binding [`,' bindinglist] +bindinglist ::= binding [`,' bindinglist] (* equivalent of Lua 5.1 `namelist`, except with optional type annotations *) var ::= NAME | prefixexp `[' exp `]' | prefixexp `.' Name varlist ::= var {`,' var} @@ -58,7 +58,7 @@ unop ::= `-' | not | `#' SimpleType ::= nil | - NAME[`.' NAME] [ `<' Type {`,' Type} `>' ] | + NAME[`.' NAME] [ `<' TypeList `>' ] | `typeof' `(' exp `)' | TableType | FunctionType