mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 16:39:38 +08:00
ast.rs: add Leaf::has_source() convenience function for now
This is exposed by our FFI bridge for convenience, so this makes porting easier.
This commit is contained in:
parent
966dc0d997
commit
dc6aead17b
@ -401,6 +401,9 @@ pub trait Leaf: Node {
|
||||
/// we accepted incomplete and the token stream was exhausted.
|
||||
fn range(&self) -> Option<SourceRange>;
|
||||
fn range_mut(&mut self) -> &mut Option<SourceRange>;
|
||||
fn has_source(&self) -> bool {
|
||||
self.range().is_some()
|
||||
}
|
||||
fn leaf_as_node_ffi(&self) -> &dyn Node;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user