mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Introduce Ident alias
This commit is contained in:
parent
352ab5ed34
commit
2872841f6e
2 changed files with 5 additions and 3 deletions
|
@ -11,11 +11,11 @@ pub enum Expr {
|
|||
Char(char),
|
||||
Bool(bool),
|
||||
|
||||
Var(String),
|
||||
Var(Ident),
|
||||
Let(Pattern, Box<Expr>, Box<Expr>),
|
||||
|
||||
// Functions
|
||||
Func(String, Vec<Expr>),
|
||||
Func(Ident, Vec<Expr>),
|
||||
Apply(Box<Expr>, Vec<Expr>),
|
||||
Operator(Box<Expr>, Operator, Box<Expr>),
|
||||
Closure(SmallVec<[Pattern; 4]>, Box<Expr>),
|
||||
|
@ -34,6 +34,8 @@ pub enum Expr {
|
|||
Error(Problem),
|
||||
}
|
||||
|
||||
type Ident = String;
|
||||
|
||||
impl fmt::Display for Expr {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use expr::Operator;
|
||||
use expr::{Expr, Pattern};
|
||||
use expr::{Expr, Pattern, Ident};
|
||||
|
||||
use std::char;
|
||||
use parse_state::{IndentablePosition};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue