remove unused functions

This commit is contained in:
りき萌 2025-09-01 17:17:54 +02:00
parent 40038d3fdc
commit ce9150b588
2 changed files with 1 additions and 47 deletions

View file

@ -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,

View file

@ -81,11 +81,6 @@ impl Database {
pub fn start(settings: Settings) -> eyre::Result<Database> {
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<Database> {
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),