@quenk/wml 2.11.3 → 2.11.4
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.
- package/lib/compile/codegen.js +3 -3
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +3 -3
- package/lib/compile/transform.js +8 -5
- package/lib/compile/transform.js.map +1 -1
- package/lib/compile/transform.ts +12 -6
- package/lib/parse/ast.d.ts +11 -1
- package/lib/parse/ast.js +15 -2
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +16 -3
- package/lib/parse/generated.js +1218 -1206
- package/lib/parse/wml.y +9 -6
- package/package.json +1 -1
package/lib/parse/wml.y
CHANGED
|
@@ -373,15 +373,18 @@ view_statement
|
|
|
373
373
|
;
|
|
374
374
|
|
|
375
375
|
view_statement_context
|
|
376
|
-
:
|
|
376
|
+
: constructor_type
|
|
377
377
|
{ $$ = $1; }
|
|
378
378
|
|
|
379
|
-
|
|
|
380
|
-
{$$ =
|
|
381
|
-
$3, @$);
|
|
382
|
-
}
|
|
379
|
+
| context_from_statement
|
|
380
|
+
{$$ = $1; }
|
|
383
381
|
;
|
|
384
382
|
|
|
383
|
+
context_from_statement
|
|
384
|
+
: constructor_type FROM string_literal
|
|
385
|
+
{$$ = new yy.ast.ContextFromStatement($1, $3, @$); }
|
|
386
|
+
;
|
|
387
|
+
|
|
385
388
|
view_directives
|
|
386
389
|
: let_statement
|
|
387
390
|
{ $$ = [$1]; }
|
|
@@ -469,7 +472,7 @@ constructor_type
|
|
|
469
472
|
{ $$ = new yy.ast.ConstructorType($1, [], @$); }
|
|
470
473
|
|
|
471
474
|
| cons type_parameters
|
|
472
|
-
{ $$ = new yy.ast.ConstructorType($1, $2, @$);
|
|
475
|
+
{ $$ = new yy.ast.ConstructorType($1, $2, @$); }
|
|
473
476
|
;
|
|
474
477
|
|
|
475
478
|
record_type
|