diff --git a/crates/haku/src/parser.rs b/crates/haku/src/parser.rs index a64aad8..76c1ba1 100644 --- a/crates/haku/src/parser.rs +++ b/crates/haku/src/parser.rs @@ -536,47 +536,6 @@ fn if_expr(p: &mut Parser) -> Closed { p.close(o, NodeKind::If) } -fn let_expr(p: &mut Parser) -> Closed { - let o = p.open(); - - p.advance(); // let - - if p.peek() == TokenKind::Ident { - let ident = p.open(); - p.advance(); - p.close(ident, NodeKind::Ident); - } else { - let span = p.span(); - p.emit(Diagnostic::error(span, "`let` variable name expected")); - p.advance_with_error(); - } - - if p.peek() == TokenKind::Equal { - p.advance(); - } else { - let span = p.span(); - p.emit(Diagnostic::error(span, "`=` expected after variable name")); - p.advance_with_error(); - } - - expr(p); - - if p.peek() == TokenKind::Newline { - p.advance(); - } else { - let span = p.span(); - p.emit(Diagnostic::error( - span, - "new line expected after `let` expression", - )); - p.advance_with_error(); - } - - expr(p); - - p.close(o, NodeKind::Let) -} - const PREFIX_TOKENS: TokenKindSet = TokenKindSet::new(&[ TokenKind::Ident, TokenKind::Tag, diff --git a/crates/rkgk/src/wall/database.rs b/crates/rkgk/src/wall/database.rs index 3e146c0..8850c9c 100644 --- a/crates/rkgk/src/wall/database.rs +++ b/crates/rkgk/src/wall/database.rs @@ -81,11 +81,6 @@ impl Database { pub fn start(settings: Settings) -> eyre::Result { let db = Connection::open(settings.path).context("cannot open wall database")?; - let major: u32 = env!("CARGO_PKG_VERSION_MAJOR").parse().unwrap(); - let minor: u32 = env!("CARGO_PKG_VERSION_MINOR").parse().unwrap(); - let patch: u32 = env!("CARGO_PKG_VERSION_PATCH").parse().unwrap(); - let version = major * 1_000_000 + minor * 1_000 + patch; - info!("initial setup"); let version: u32 = db.pragma_query_value(None, "user_version", |x| x.get(0))?; @@ -110,7 +105,7 @@ pub fn start(settings: Settings) -> eyre::Result { paint_area INTEGER NOT NULL, chunk_size INTEGER NOT NULL ); - + CREATE TABLE IF NOT EXISTS t_wall_info ( id INTEGER PRIMARY KEY CHECK (id = 1),