Add Context::position

This commit is contained in:
Sunli 2020-05-14 17:35:25 +08:00
parent 53a964704f
commit 7ab8326cbf

View File

@ -516,4 +516,9 @@ impl<'a> ContextBase<'a, &'a Positioned<Field>> {
.map(|alias| alias.node)
.unwrap_or_else(|| self.item.name.node)
}
/// Get the position of the current field in the query code.
pub fn position(&self) -> Pos {
self.pos
}
}