From ede5d17b0409f9d5a209aaf16508262dbd2a4489 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 00:27:00 +0200 Subject: Finish SourceFile grammar --- crates/ra_syntax/src/ast/generated/nodes.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/ast/generated') diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 3c8bdfcad..dfda79550 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -11,7 +11,9 @@ pub struct SourceFile { } impl ast::AttrsOwner for SourceFile {} impl ast::ModuleItemOwner for SourceFile {} -impl SourceFile {} +impl SourceFile { + pub fn shebang_token(&self) -> Option { support::token(&self.syntax, T![shebang]) } +} #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct Attr { pub(crate) syntax: SyntaxNode, -- cgit v1.2.3