Add todo for label as value block terminal

We need to revisit the conversion from value blocks into ReactiveFunction. Or 
just revisit ReactiveFunction altogether (see my post about what this would look 
like). For now, makes this case a todo.
This commit is contained in:
Joe Savona committed 2024-03-13 22:20:59 -07:00
1 parent d70b2c2c4e
commit 1301e68ae6
2 files changed
+9 -1

No files matched your search

@@ -1069,6 +1069,14 @@ class Driver {
suggestions: null,
});
}
case "label": {
CompilerError.throwTodo({
reason: `Support labeled statements combined with value blocks (conditional, logical, optional chaining, etc)`,
description: null,
loc: terminal.loc,
suggestions: null,
});
}
default: {
CompilerError.invariant(false, {
reason: `Unexpected value block terminal kind '${terminal.kind}'`,
@@ -23,7 +23,7 @@ function Component(props) {
> 4 | return [props.value];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 5 | }) || []
| ^^^^^^^^^^^^^ [ReactForget] Invariant: Unexpected value block terminal kind 'label' (3:5)
| ^^^^^^^^^^^^^ [ReactForget] Todo: Support labeled statements combined with value blocks (conditional, logical, optional chaining, etc) (3:5)
6 | );
7 | }
8 |