Skip to content

Commit

Permalink
Mark most module statements as not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
voltrevo committed Jun 23, 2023
1 parent a03aece commit 9135181
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions valuescript_compiler/src/module_compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,23 +214,23 @@ impl ModuleCompiler {

match stmt {
Decl(decl) => self.compile_module_level_decl(decl),
Block(block) => self.todo(block.span, "module level Block statement"),
Block(block) => self.not_supported(block.span, "module level Block statement"),
Empty(_) => {}
Debugger(debugger) => self.todo(debugger.span, "module level Debugger statement"),
With(with) => self.todo(with.span, "module level With statement"),
Return(return_) => self.todo(return_.span, "module level Return statement"),
Labeled(labeled) => self.todo(labeled.span, "module level Labeled statement"),
Break(break_) => self.todo(break_.span, "module level Break statement"),
Continue(continue_) => self.todo(continue_.span, "module level Continue statement"),
If(if_) => self.todo(if_.span, "module level If statement"),
Switch(switch) => self.todo(switch.span, "module level Switch statement"),
Throw(throw) => self.todo(throw.span, "module level Throw statement"),
Try(try_) => self.todo(try_.span, "module level Try statement"),
While(while_) => self.todo(while_.span, "module level While statement"),
DoWhile(do_while) => self.todo(do_while.span, "module level DoWhile statement"),
For(for_) => self.todo(for_.span, "module level For statement"),
ForIn(for_in) => self.todo(for_in.span, "module level ForIn statement"),
ForOf(for_of) => self.todo(for_of.span, "module level ForOf statement"),
Debugger(debugger) => self.not_supported(debugger.span, "module level Debugger statement"),
With(with) => self.not_supported(with.span, "module level With statement"),
Return(return_) => self.not_supported(return_.span, "module level Return statement"),
Labeled(labeled) => self.not_supported(labeled.span, "module level Labeled statement"),
Break(break_) => self.not_supported(break_.span, "module level Break statement"),
Continue(continue_) => self.not_supported(continue_.span, "module level Continue statement"),
If(if_) => self.not_supported(if_.span, "module level If statement"),
Switch(switch) => self.not_supported(switch.span, "module level Switch statement"),
Throw(throw) => self.not_supported(throw.span, "module level Throw statement"),
Try(try_) => self.not_supported(try_.span, "module level Try statement"),
While(while_) => self.not_supported(while_.span, "module level While statement"),
DoWhile(do_while) => self.not_supported(do_while.span, "module level DoWhile statement"),
For(for_) => self.not_supported(for_.span, "module level For statement"),
ForIn(for_in) => self.not_supported(for_in.span, "module level ForIn statement"),
ForOf(for_of) => self.not_supported(for_of.span, "module level ForOf statement"),
Expr(expr) => self.todo(expr.span, "module level Expr statement"),
};
}
Expand Down

0 comments on commit 9135181

Please sign in to comment.