Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar.rs')
-rw-r--r--crates/parser/src/grammar.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs
index 8ddf50db04..bf84302941 100644
--- a/crates/parser/src/grammar.rs
+++ b/crates/parser/src/grammar.rs
@@ -94,7 +94,17 @@ pub(crate) mod entry {
pub(crate) fn source_file(p: &mut Parser<'_>) {
let m = p.start();
+ // test frontmatter
+ // #!/usr/bin/env cargo
+ //
+ // ---
+ // [dependencies]
+ // clap = { version = "4.2", features = ["derive"] }
+ // ---
+ //
+ // fn main() {}
p.eat(SHEBANG);
+ p.eat(FRONTMATTER);
items::mod_contents(p, false);
m.complete(p, SOURCE_FILE);
}