mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-15 01:45:02 +01:00
better errors
This commit is contained in:
parent
c6e5a5d686
commit
67e6dfccc2
4 changed files with 152 additions and 43 deletions
|
|
@ -76,6 +76,7 @@ pub struct Break {
|
|||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum Expr {
|
||||
Ident(Symbol, Span),
|
||||
Literal(Literal),
|
||||
UnaryOp(Box<UnaryOp>),
|
||||
BinaryOp(Box<BinaryOp>),
|
||||
|
|
@ -87,6 +88,7 @@ impl Expr {
|
|||
Expr::Literal(lit) => lit.span(),
|
||||
Expr::UnaryOp(unary) => unary.span,
|
||||
Expr::BinaryOp(binary) => binary.span,
|
||||
Expr::Ident(_, span) => *span,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue