Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/node_ext.rs')
| -rw-r--r-- | crates/syntax/src/ast/node_ext.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs index f7c7327776..ce01ee1c35 100644 --- a/crates/syntax/src/ast/node_ext.rs +++ b/crates/syntax/src/ast/node_ext.rs @@ -53,6 +53,12 @@ fn text_of_first_token(node: &SyntaxNode) -> TokenText<'_> { } } +impl ast::Abi { + pub fn abi_string(&self) -> Option<ast::String> { + support::token(&self.syntax, SyntaxKind::STRING).and_then(ast::String::cast) + } +} + impl ast::HasModuleItem for ast::StmtList {} impl ast::BlockExpr { |