summaryrefslogtreecommitdiff
path: root/dhall/src/syntax/ast
diff options
context:
space:
mode:
authorNadrieril2020-03-13 16:50:49 +0000
committerNadrieril2020-03-31 21:44:01 +0100
commit2f5c45fd2f712f7befe6f7c92b62dc76d5f77538 (patch)
tree4331c48d2519ba3ebb8de9c481f6fda684b70a47 /dhall/src/syntax/ast
parentf175ea7860cc1dd614b17912140ab7f5400c6bff (diff)
Rename LitKind to NumKind
Diffstat (limited to 'dhall/src/syntax/ast')
-rw-r--r--dhall/src/syntax/ast/expr.rs6
-rw-r--r--dhall/src/syntax/ast/visitor.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs
index b53e6cb..2c1860e 100644
--- a/dhall/src/syntax/ast/expr.rs
+++ b/dhall/src/syntax/ast/expr.rs
@@ -112,9 +112,9 @@ pub struct Expr {
pub type UnspannedExpr = ExprKind<Expr>;
-/// Simple literals
+/// Numeric literals
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub enum LitKind {
+pub enum NumKind {
/// `True`
Bool(bool),
/// `1`
@@ -132,7 +132,7 @@ pub enum LitKind {
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ExprKind<SubExpr> {
Const(Const),
- Lit(LitKind),
+ Num(NumKind),
/// `x`
/// `x@n`
Var(V),
diff --git a/dhall/src/syntax/ast/visitor.rs b/dhall/src/syntax/ast/visitor.rs
index c361bc1..0743af4 100644
--- a/dhall/src/syntax/ast/visitor.rs
+++ b/dhall/src/syntax/ast/visitor.rs
@@ -91,7 +91,7 @@ where
Annot(x, t) => Annot(expr!(x)?, expr!(t)?),
Const(k) => Const(*k),
Builtin(v) => Builtin(*v),
- Lit(l) => Lit(l.clone()),
+ Num(n) => Num(n.clone()),
TextLit(t) => TextLit(t.traverse_ref(|e| expr!(e))?),
BinOp(o, x, y) => BinOp(*o, expr!(x)?, expr!(y)?),
BoolIf(b, t, f) => BoolIf(expr!(b)?, expr!(t)?, expr!(f)?),