mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-04 10:50:15 +00:00
Merge from rust-lang/rust
This commit is contained in:
commit
9e86544698
10 changed files with 25 additions and 7 deletions
|
@ -133,6 +133,7 @@ Meta =
|
|||
|
||||
SourceFile =
|
||||
'#shebang'?
|
||||
'#frontmatter'?
|
||||
Attr*
|
||||
Item*
|
||||
|
||||
|
|
|
@ -1524,6 +1524,10 @@ impl ast::HasAttrs for SourceFile {}
|
|||
impl ast::HasDocComments for SourceFile {}
|
||||
impl ast::HasModuleItem for SourceFile {}
|
||||
impl SourceFile {
|
||||
#[inline]
|
||||
pub fn frontmatter_token(&self) -> Option<SyntaxToken> {
|
||||
support::token(&self.syntax, T![frontmatter])
|
||||
}
|
||||
#[inline]
|
||||
pub fn shebang_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![shebang]) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue