mirror of
https://github.com/danog/parser.git
synced 2024-11-26 20:04:57 +01:00
chore: format
This commit is contained in:
parent
2492a82bcc
commit
1beb4e5634
@ -5125,17 +5125,16 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn short_foreach() {
|
||||
assert_ast("<?php foreach ($a as $b): $c; endforeach;", &[
|
||||
Statement::Foreach {
|
||||
assert_ast(
|
||||
"<?php foreach ($a as $b): $c; endforeach;",
|
||||
&[Statement::Foreach {
|
||||
expr: Expression::Variable { name: "a".into() },
|
||||
by_ref: false,
|
||||
key_var: None,
|
||||
value_var: Expression::Variable { name: "b".into() },
|
||||
body: vec![
|
||||
expr!(Expression::Variable { name: "c".into() })
|
||||
]
|
||||
}
|
||||
]);
|
||||
body: vec![expr!(Expression::Variable { name: "c".into() })],
|
||||
}],
|
||||
);
|
||||
}
|
||||
|
||||
fn assert_ast(source: &str, expected: &[Statement]) {
|
||||
|
Loading…
Reference in New Issue
Block a user