Skip to content

Commit

Permalink
Differentiate between top level and expr syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Cypher1 committed May 5, 2024
1 parent 2d101c1 commit 942ed14
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions takolib/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,10 +1073,15 @@ pub mod tests {
setup("a << b + 1").expect("Disallowed syntax");
}

#[test]
fn parse_atom_atom_in_file() {
setup("$a $b").expect("Top level allowed syntax");
}

#[test]
#[should_panic] // TODO(errors): Implement!
fn parse_atom_atom() {
setup("$a $b").expect("Disallowed syntax");
fn parse_atom_atom_in_expr() {
setup("($a $b)").expect("Disallowed syntax");
}

#[test]
Expand Down

0 comments on commit 942ed14

Please sign in to comment.