//! > Missing semicolon.
//! > test_runner_name
get_diagnostics
//! > cairo_code
mod my_mod
fn foo() {}
//! > expected_diagnostics
error[E1029]: Expected either ';' or '{' after module name. Use ';' for an external module declaration or '{' for a module with a body.
--> dummy_file.cairo:1:11
mod my_mod
^
//! > ==========================================================================
//! > Missing lbrace.
//! > test_runner_name
get_diagnostics
//! > cairo_code
mod my_mod }
//! > expected_diagnostics
error[E1029]: Expected either ';' or '{' after module name. Use ';' for an external module declaration or '{' for a module with a body.
--> dummy_file.cairo:1:11
mod my_mod }
^
error[E1000]: Skipped tokens. Expected: Const/Enum/ExternFunction/ExternType/Function/Impl/InlineMacro/Module/Struct/Trait/TypeAlias/Use or an attribute.
--> dummy_file.cairo:1:12
mod my_mod }
^
//! > ==========================================================================
//! > Missing rbrace.
//! > test_runner_name
get_diagnostics
//! > cairo_code
mod my_mod {
fn foo() {}
//! > expected_diagnostics
error[E1001]: Missing token '}'.
--> dummy_file.cairo:2:12
fn foo() {}
^
//! > ==========================================================================
//! > Invalid token after module name.
//! > test_runner_name
get_diagnostics
//! > cairo_code
mod my_mod const X: felt252 = 5;
//! > expected_diagnostics
error[E1029]: Expected either ';' or '{' after module name. Use ';' for an external module declaration or '{' for a module with a body.
--> dummy_file.cairo:1:11
mod my_mod const X: felt252 = 5;
^
//! > ==========================================================================
//! > Error recovery stops at a following `macro` declaration.
//! > test_runner_name
get_diagnostics
//! > cairo_code
const X
macro m {
($x: expr) => { $x };
}
//! > expected_diagnostics
error[E1004]: Unexpected token, expected ':' followed by a type.
--> dummy_file.cairo:1:8
const X
^
error[E1001]: Missing token '='.
--> dummy_file.cairo:1:8
const X
^
error[E1002]: Missing tokens. Expected an expression.
--> dummy_file.cairo:1:8
const X
^
error[E1001]: Missing token ';'.
--> dummy_file.cairo:1:8
const X
^