yapp 2.2.80 → 2.2.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,75 +14,75 @@ const bnf = `
14
14
 
15
15
  statement ::= class
16
16
 
17
- | function
17
+ | function
18
18
 
19
- | generator
19
+ | generator
20
20
 
21
- | "export"? ( ( "var" var ( "," var )* )
22
-
23
- | ( "let" let ( "," let )* )
24
-
25
- | ( "const" const ( "," const )* )
26
-
27
- ) ";"
21
+ | "export"? ( ( "var" var ( "," var )* )
22
+
23
+ | ( "let" let ( "," let )* )
24
+
25
+ | ( "const" const ( "," const )* )
26
+
27
+ ) ";"
28
28
 
29
29
  | "export" "default" expression ";"
30
-
30
+
31
31
  | "export" "default"? ( class | function | generator )
32
32
 
33
33
  | "export" "default" ( anonymousClass | anonymousFunction | anonymousGenerator )
34
-
35
- | "export" ( ( "export" "{" names "}" ( "from" [string-literal] )? )
36
-
34
+
35
+ | "export" ( ( "export" "{" names "}" ( "from" [string-literal] )? )
36
+
37
37
  | ( "export" "const" "{" fields "}" "=" expression )
38
-
38
+
39
39
  | ( "export" "{" "default" "}" "from" [string-literal] )
40
-
40
+
41
41
  | ( "export" "*" ( "as" name )? "from" [string-literal] )
42
-
42
+
43
43
  ) ";"
44
44
 
45
45
  | "import" ( [string-literal]
46
-
47
- | ( name "from" [string-literal] )
48
-
49
- | ( "{" names "}" "from" [string-literal] )
50
-
51
- | ( "*" "as" name "from" [string-literal] )
52
-
46
+
47
+ | ( name "from" [string-literal] )
48
+
49
+ | ( "{" names "}" "from" [string-literal] )
50
+
51
+ | ( "*" "as" name "from" [string-literal] )
52
+
53
53
  ) ";"
54
54
 
55
55
  | label ":" statement
56
56
 
57
57
  | "{" statement* "}"
58
58
 
59
- | "break" ";"
59
+ | "break" ";"
60
60
 
61
- | "continue" ";"
61
+ | "continue" ";"
62
62
 
63
- | "if" "(" expression ")" statement ( "else" statement )?
63
+ | "if" "(" expression ")" statement ( "else" statement )?
64
64
 
65
- | "switch" "(" expression ")" "{" case* defaultCase? "}"
65
+ | "switch" "(" expression ")" "{" case* defaultCase? "}"
66
66
 
67
- | "return" expression? ";"
67
+ | "return" expression? ";"
68
68
 
69
- | "throw" expression ";"
69
+ | "throw" expression ";"
70
70
 
71
- | "delete" expression ";"
71
+ | "delete" expression ";"
72
72
 
73
73
  | expression! ";"
74
74
 
75
- | try ( ( catch* finally ) | catch+ )
75
+ | try ( ( catch* finally ) | catch+ )
76
76
 
77
- | "do" statement "while" "(" expression ")" ";"
77
+ | "do" statement "while" "(" expression ")" ";"
78
78
 
79
- | "for" "(" initialiser ( ";" expression )? ( ";" expression )? ")" statement
79
+ | "for" "(" initialiser ( ";" expression )? ( ";" expression )? ")" statement
80
80
 
81
- | "for" "(" variable "in" expression ")" statement
81
+ | "for" "(" variable "in" expression ")" statement
82
82
 
83
- | "for" "await"? "(" variable "of" expression ")" statement
83
+ | "for" "await"? "(" variable "of" expression ")" statement
84
84
 
85
- | "while" "(" expression ")" statement
85
+ | "while" "(" expression ")" statement
86
86
 
87
87
  | "debugger" ";"?
88
88
 
@@ -136,18 +136,18 @@ const bnf = `
136
136
 
137
137
  const ::= ( variable | destructure ) "=" expression ;
138
138
 
139
- destructure ::= "[" variable ( "=" expression )? ( "," variable ( "=" expression )? )* "]"
139
+ destructure ::= "[" variable ( "=" expression )? ( "," variable ( "=" expression )? )* "]"
140
140
 
141
141
  | "{" variable ( "=" expression )? ( "," variable ( "=" expression )? )* "}"
142
142
 
143
- ;
143
+ ;
144
144
 
145
145
 
146
146
 
147
147
  expression ::= jsx
148
-
148
+
149
149
  | json
150
-
150
+
151
151
  | arrowFunction
152
152
 
153
153
  | templateLiteral
@@ -160,43 +160,43 @@ const bnf = `
160
160
 
161
161
  | "[" ( expression ( "," expression )* ","? )? "]"
162
162
 
163
- | "typeof" ( expression | ( "(" expression ")") )
163
+ | "typeof" ( expression | ( "(" expression ")") )
164
164
 
165
- | "void" ( expression | ( "(" expression ")") )
165
+ | "void" ( expression | ( "(" expression ")") )
166
166
 
167
167
  | "new" name<NO_WHITESPACE>"(" arguments? ")"
168
168
 
169
- | [operator]<NO_WHITESPACE>expression
170
-
171
- | expression<NO_WHITESPACE>( ( "."<NO_WHITESPACE>name )
172
-
173
- | ( "[" expressions "]" )
174
-
175
- | ( "(" expressions? ")" )
176
-
177
- | templateLiteral
178
-
179
- | [operator]
180
-
181
- )
182
-
183
- | expression ( ( [operator] expression )
184
-
185
- | ( "?" expression ":" expression )
186
-
187
- | ( "instanceof" expression )
188
-
189
- | ( "in" expression )
190
-
191
- )
169
+ | [operator]<NO_WHITESPACE>expression
170
+
171
+ | expression<NO_WHITESPACE>( ( "."<NO_WHITESPACE>name )
172
+
173
+ | ( "[" expressions "]" )
174
+
175
+ | ( "(" expressions? ")" )
176
+
177
+ | templateLiteral
178
+
179
+ | [operator]
180
+
181
+ )
182
+
183
+ | expression ( ( [operator] expression )
184
+
185
+ | ( "?" expression ":" expression )
186
+
187
+ | ( "instanceof" expression )
188
+
189
+ | ( "in" expression )
190
+
191
+ )
192
192
 
193
193
  | [number]
194
194
 
195
- | variable
196
-
197
- | primitive
198
-
199
- | importMeta
195
+ | variable
196
+
197
+ | primitive
198
+
199
+ | importMeta
200
200
 
201
201
  | [string-literal]
202
202
 
@@ -223,22 +223,22 @@ const bnf = `
223
223
  jsonArray ::= "[" ( jsonElement ( "," jsonElement )* )? "]" ;
224
224
 
225
225
  jsonObject ::= "{" ( [string-literal] ":" jsonElement ( "," [string-literal] ":" jsonElement )* )? "}" ;
226
-
226
+
227
227
  jsonElement ::= json | [string-literal] | [number] | "true" | "false" | "null" ;
228
-
228
+
229
229
 
230
230
 
231
231
  arrowFunction ::= simpleArrowFunction | complexArrowFunction ;
232
232
 
233
233
  arrowFunctionBody ::= expression | ( "{" statement* "}" ) ;
234
234
 
235
- simpleArrowFunction ::= argument "=>" arrowFunctionBody ;
235
+ simpleArrowFunction ::= argument "=>" arrowFunctionBody ;
236
236
 
237
- complexArrowFunction ::= "(" arguments? ")" "=>" arrowFunctionBody ;
237
+ complexArrowFunction ::= "(" arguments? ")" "=>" arrowFunctionBody ;
238
238
 
239
239
 
240
240
 
241
- templateLiteral ::= "\`" ( ( "\${" expression? "}" ) | string )* "\`" ;
241
+ templateLiteral ::= "\`" ( ( "\${" expression? "}" ) | string )* "\`" ;
242
242
 
243
243
 
244
244
 
@@ -266,9 +266,9 @@ const bnf = `
266
266
 
267
267
  variable ::= [identifier] ;
268
268
 
269
- label ::= [identifier] ;
269
+ label ::= [identifier] ;
270
270
 
271
- name ::= [identifier] ;
271
+ name ::= [identifier] ;
272
272
 
273
273
 
274
274