8000 Updating grammar appendix · ezhangle/TypeScript@f18ec2e · GitHub
[go: up one dir, main page]

Skip to content

Commit f18ec2e

Browse files
committed
Updating grammar appendix
1 parent 6f2f2d1 commit f18ec2e

5 files changed

+40
-3
lines changed
Binary file not shown.
Binary file not shown.
275 Bytes
Binary file not shown.
4.66 KB
Binary file not shown.

doc/spec.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5751,14 +5751,51 @@ This appendix contains a summary of the grammar found in the main document. As d
57515751
## <a name="A.3"/>A.3 Statements
57525752
57535753
&emsp;&emsp;*VariableDeclaration:* *( Modified )*
5754-
&emsp;&emsp;&emsp;*Identifier*&emsp;*TypeAnnotation<sub>opt</sub>*&emsp;*Initialiser<sub>opt</sub>*
5754+
&emsp;&emsp;&emsp;*SimpleVariableDeclaration*
5755+
&emsp;&emsp;&emsp;*DestructuringVariableDeclaration*
57555756
5756-
&emsp;&emsp;*VariableDeclarationNoIn:* *( Modified )*
5757-
&emsp;&emsp;&emsp;*Identifier*&emsp;*TypeAnnotation<sub>opt</sub>*&emsp;*InitialiserNoIn<sub>opt</sub>*
5757+
&emsp;&emsp;*SimpleVariableDeclaration:*
5758+
&emsp;&emsp;&emsp;*Identifier*&emsp;*TypeAnnotation<sub>opt</sub>*&emsp;*Initialiser<sub>opt</sub>*
57585759
57595760
&emsp;&emsp;*TypeAnnotation:*
57605761
&emsp;&emsp;&emsp;`:`&emsp;*Type*
57615762
5763+
&emsp;&emsp;*DestructuringVariableDeclaration:*
5764+
&emsp;&emsp;&emsp;*BindingPattern*&emsp;*TypeAnnotation<sub>opt</sub>*&emsp;*Initialiser*
5765+
5766+
&emsp;&emsp;*BindingPattern:*
5767+
&emsp;&emsp;&emsp;*ObjectBindingPattern*
5768+
&emsp;&emsp;&emsp;*ArrayBindingPattern*
5769+
5770+
&emsp;&emsp;*ObjectBindingPattern:*
5771+
&emsp;&emsp;&emsp;`{`&emsp;`}`
5772+
&emsp;&emsp;&emsp;`{`&emsp;*BindingPropertyList*&emsp;`,`*<sub>opt</sub>*&emsp;`}`
5773+
5774+
&emsp;&emsp;*BindingPropertyList:*
5775+
&emsp;&emsp;&emsp;*BindingProperty*
5776+
&emsp;&emsp;&emsp;*BindingPropertyList*&emsp;`,`&emsp;*BindingProperty*
5777+
5778+
&emsp;&emsp;*BindingProperty:*
5779+
&emsp;&emsp;&emsp;*Identifier*&emsp;*Initialiser<sub>opt</sub>*
5780+
&emsp;&emsp;&emsp;*PropertyName*&emsp;`:`&emsp;*Identifier*&emsp;*Initialiser<sub>opt</sub>*
5781+
&emsp;&emsp;&emsp;*PropertyName*&emsp;`:`&emsp;*BindingPattern*&emsp;*Initialiser<sub>opt</sub>*
5782+
5783+
&emsp;&emsp;*ArrayBindingPattern:*
5784+
&emsp;&emsp;&emsp;`[`&emsp;*Elision<sub>opt</sub>*&emsp;*BindingRestElement<sub>opt</sub>*&emsp;`]`
5785+
&emsp;&emsp;&emsp;`[`&emsp;*BindingElementList*&emsp;`]`
5786+
&emsp;&emsp;&emsp;`[`&emsp;*BindingElementList*&emsp;`,`&emsp;*Elision<sub>opt</sub>*&emsp;*BindingRestElement<sub>opt</sub>*&emsp;`]`
5787+
5788+
&emsp;&emsp;*BindingElementList:*
5789+
&emsp;&emsp;&emsp;*Elision<sub>opt</sub>*&emsp;*BindingElement*
5790+
&emsp;&emsp;&emsp;*BindingElementList*&emsp;`,`&emsp;*Elision<sub>opt</sub>*&emsp;*BindingElement*
5791+
5792+
&emsp;&emsp;*BindingElement:*
5793+
&emsp;&emsp;&emsp;*Identifier*&emsp;*Initialiser<sub>opt</sub>*
5794+
&emsp;&emsp;&emsp;*BindingPattern*&emsp;*Initialiser<sub>opt</sub>*
5795+
5796+
&emsp;&emsp;*BindingRestElement:*
5797+
&emsp;&emsp;&emsp;`...`&emsp;*Identifier*
5798+
57625799
## <a name="A.4"/>A.4 Functions
57635800
57645801
&emsp;&emsp;*FunctionDeclaration:* *( Modified )*

0 commit comments

Comments
 (0)
0