summaryrefslogtreecommitdiff
path: root/dhall/src/syntax/ast
diff options
context:
space:
mode:
authorNadrieril Feneanar2019-12-24 20:41:22 +0000
committerGitHub2019-12-24 20:41:22 +0000
commit057d645a90a6b57f40f72eb7e347ba2c6219777e (patch)
tree151473a0a6cb7222fd6b4eb3abf1cfacca012aad /dhall/src/syntax/ast
parent06e75c919d999c310f8ca1c151c6a5ad6918ca08 (diff)
parent18dd5ba3ae94fd89dd27c0ae3891ac3e43ace350 (diff)
Merge pull request #124 from Nadrieril/catchup-spec
Catchup on standard changes
Diffstat (limited to '')
-rw-r--r--dhall/src/syntax/ast/expr.rs4
-rw-r--r--dhall/src/syntax/ast/visitor.rs7
2 files changed, 11 insertions, 0 deletions
diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs
index 48c48d8..68cb524 100644
--- a/dhall/src/syntax/ast/expr.rs
+++ b/dhall/src/syntax/ast/expr.rs
@@ -79,6 +79,8 @@ pub enum Builtin {
NaturalSubtract,
IntegerToDouble,
IntegerShow,
+ IntegerNegate,
+ IntegerClamp,
DoubleShow,
ListBuild,
ListFold,
@@ -163,6 +165,8 @@ pub enum ExprKind<SubExpr, Embed> {
Projection(SubExpr, DupTreeSet<Label>),
/// `e.(t)`
ProjectionByExpr(SubExpr, SubExpr),
+ /// `x::y`
+ Completion(SubExpr, SubExpr),
/// `./some/path`
Import(Import<SubExpr>),
/// Embeds the result of resolving an import
diff --git a/dhall/src/syntax/ast/visitor.rs b/dhall/src/syntax/ast/visitor.rs
index b557995..424048b 100644
--- a/dhall/src/syntax/ast/visitor.rs
+++ b/dhall/src/syntax/ast/visitor.rs
@@ -164,6 +164,9 @@ where
ProjectionByExpr(e, x) => {
ProjectionByExpr(v.visit_subexpr(e)?, v.visit_subexpr(x)?)
}
+ Completion(e, x) => {
+ Completion(v.visit_subexpr(e)?, v.visit_subexpr(x)?)
+ }
Assert(e) => Assert(v.visit_subexpr(e)?),
Import(i) => Import(i.traverse_ref(|e| v.visit_subexpr(e))?),
Embed(a) => Embed(v.visit_embed(a)?),
@@ -281,6 +284,10 @@ where
v.visit_subexpr(e)?;
v.visit_subexpr(x)?;
}
+ Completion(x, y) => {
+ v.visit_subexpr(x)?;
+ v.visit_subexpr(y)?;
+ }
Assert(e) => v.visit_subexpr(e)?,
Import(i) => i.traverse_mut(|e| v.visit_subexpr(e))?,
Embed(a) => v.visit_embed(a)?,