aboutsummaryrefslogtreecommitdiff
path: root/lib/src/make.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/make.rs')
-rw-r--r--lib/src/make.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/src/make.rs b/lib/src/make.rs
index c36fa7e..2c33ac8 100644
--- a/lib/src/make.rs
+++ b/lib/src/make.rs
@@ -88,3 +88,7 @@ pub fn empty() -> types::Root {
88pub fn binary(lhs: &SyntaxNode, op: &str, rhs: &SyntaxNode) -> types::BinOp { 88pub fn binary(lhs: &SyntaxNode, op: &str, rhs: &SyntaxNode) -> types::BinOp {
89 ast_from_text(&format!("{} {} {}", lhs, op, rhs)) 89 ast_from_text(&format!("{} {} {}", lhs, op, rhs))
90} 90}
91
92pub fn or_default(set: &SyntaxNode, index: &SyntaxNode, default: &SyntaxNode) -> types::OrDefault {
93 ast_from_text(&format!("{}.{} or {}", set, index, default))
94}