mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-15 09:55:03 +01:00
start bytecode compilation
This commit is contained in:
parent
b35d12e041
commit
c6765d7da6
14 changed files with 342 additions and 46 deletions
|
|
@ -495,7 +495,7 @@ impl<'code> Parser<'code> {
|
|||
TokenType::Ident(name) => {
|
||||
let name_owned = name.to_owned();
|
||||
Ok(Expr::Ident(Ident {
|
||||
name: name_owned,
|
||||
sym: name_owned,
|
||||
span: next.span,
|
||||
}))
|
||||
}
|
||||
|
|
@ -513,7 +513,7 @@ impl<'code> Parser<'code> {
|
|||
TokenType::Ident(name) => {
|
||||
let name_owned = name.to_owned();
|
||||
Ok(Ident {
|
||||
name: name_owned,
|
||||
sym: name_owned,
|
||||
span,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ fn num_lit(number: f64) -> Expr {
|
|||
|
||||
fn ident(name: &str) -> Ident {
|
||||
Ident {
|
||||
name: name.to_string(),
|
||||
sym: name.to_string(),
|
||||
span: Default::default(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue