mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Updating grammar appendix
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+40
-3
@@ -5751,14 +5751,51 @@ This appendix contains a summary of the grammar found in the main document. As d
|
||||
## <a name="A.3"/>A.3 Statements
|
||||
|
||||
  *VariableDeclaration:* *( Modified )*
|
||||
   *Identifier* *TypeAnnotation<sub>opt</sub>* *Initialiser<sub>opt</sub>*
|
||||
   *SimpleVariableDeclaration*
|
||||
   *DestructuringVariableDeclaration*
|
||||
|
||||
  *VariableDeclarationNoIn:* *( Modified )*
|
||||
   *Identifier* *TypeAnnotation<sub>opt</sub>* *InitialiserNoIn<sub>opt</sub>*
|
||||
  *SimpleVariableDeclaration:*
|
||||
   *Identifier* *TypeAnnotation<sub>opt</sub>* *Initialiser<sub>opt</sub>*
|
||||
|
||||
  *TypeAnnotation:*
|
||||
   `:` *Type*
|
||||
|
||||
  *DestructuringVariableDeclaration:*
|
||||
   *BindingPattern* *TypeAnnotation<sub>opt</sub>* *Initialiser*
|
||||
|
||||
  *BindingPattern:*
|
||||
   *ObjectBindingPattern*
|
||||
   *ArrayBindingPattern*
|
||||
|
||||
  *ObjectBindingPattern:*
|
||||
   `{` `}`
|
||||
   `{` *BindingPropertyList* `,`*<sub>opt</sub>* `}`
|
||||
|
||||
  *BindingPropertyList:*
|
||||
   *BindingProperty*
|
||||
   *BindingPropertyList* `,` *BindingProperty*
|
||||
|
||||
  *BindingProperty:*
|
||||
   *Identifier* *Initialiser<sub>opt</sub>*
|
||||
   *PropertyName* `:` *Identifier* *Initialiser<sub>opt</sub>*
|
||||
   *PropertyName* `:` *BindingPattern* *Initialiser<sub>opt</sub>*
|
||||
|
||||
  *ArrayBindingPattern:*
|
||||
   `[` *Elision<sub>opt</sub>* *BindingRestElement<sub>opt</sub>* `]`
|
||||
   `[` *BindingElementList* `]`
|
||||
   `[` *BindingElementList* `,` *Elision<sub>opt</sub>* *BindingRestElement<sub>opt</sub>* `]`
|
||||
|
||||
  *BindingElementList:*
|
||||
   *Elision<sub>opt</sub>* *BindingElement*
|
||||
   *BindingElementList* `,` *Elision<sub>opt</sub>* *BindingElement*
|
||||
|
||||
  *BindingElement:*
|
||||
   *Identifier* *Initialiser<sub>opt</sub>*
|
||||
   *BindingPattern* *Initialiser<sub>opt</sub>*
|
||||
|
||||
  *BindingRestElement:*
|
||||
   `...` *Identifier*
|
||||
|
||||
## <a name="A.4"/>A.4 Functions
|
||||
|
||||
  *FunctionDeclaration:* *( Modified )*
|
||||
|
||||
Reference in New Issue
Block a user