diff options
Diffstat (limited to 'dhall/src/syntax/ast/expr.rs')
-rw-r--r-- | dhall/src/syntax/ast/expr.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs index b53e6cb..6ba6649 100644 --- a/dhall/src/syntax/ast/expr.rs +++ b/dhall/src/syntax/ast/expr.rs @@ -22,7 +22,7 @@ pub enum Const { } impl Const { - pub(crate) fn to_universe(self) -> Universe { + pub fn to_universe(self) -> Universe { Universe::from_const(self) } } @@ -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), @@ -205,7 +205,7 @@ impl<SE> ExprKind<SE> { }) } - pub(crate) fn traverse_ref<'a, SE2, Err>( + pub fn traverse_ref<'a, SE2, Err>( &'a self, mut visit_subexpr: impl FnMut(&'a SE) -> Result<SE2, Err>, ) -> Result<ExprKind<SE2>, Err> { @@ -239,17 +239,17 @@ impl<SE> ExprKind<SE> { } impl Expr { - pub(crate) fn as_ref(&self) -> &UnspannedExpr { + pub fn as_ref(&self) -> &UnspannedExpr { &self.kind } pub fn kind(&self) -> &UnspannedExpr { &self.kind } - pub(crate) fn span(&self) -> Span { + pub fn span(&self) -> Span { self.span.clone() } - pub(crate) fn new(kind: UnspannedExpr, span: Span) -> Self { + pub fn new(kind: UnspannedExpr, span: Span) -> Self { Expr { kind: Box::new(kind), span, |