Merge pull request #7038 from mulias/expr-dbg

Support `dbg` in expressions
This commit is contained in:
Anton-4 2024-09-02 13:30:32 +02:00 committed by GitHub
commit 02cf61f985
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1308 additions and 249 deletions

View file

@ -3243,6 +3243,33 @@ fn dbg_str_followed_by_number() {
)
}
#[mono_test]
fn dbg_expr() {
indoc!(
r#"
1 + (dbg 2)
"#
)
}
#[mono_test]
fn dbg_nested_expr() {
indoc!(
r#"
dbg (dbg (dbg 1))
"#
)
}
#[mono_test]
fn dbg_inside_string() {
indoc!(
r#"
"Hello $(dbg "world")!"
"#
)
}
#[mono_test]
fn linked_list_reverse() {
indoc!(