Commit graph

15 commits

Author SHA1 Message Date
567aa31c07
feat(errors): improve error messages with example values
Add token type examples to make error messages more helpful. Created an
ExpectedToken enum to replace string literals for better type safety,
added example values for each token type, and enhanced error display to
show concrete examples of valid syntax.
2025-06-03 22:00:03 +02:00
28cb288eaf
feat(parser): implement insert command parsing
Implements the parse_insert_command function to handle the insert
statement according to the grammar definition. The function now
correctly parses the command format insert int string string and creates
a structured Statement::Insert with the id, username, and email fields.
2025-06-03 17:48:36 +02:00
71a9d82d96
feat(tokenizer): add Token::Int & UnexpectedToken error type 2025-05-10 17:00:13 +02:00
faedfadeab
refactor(error_report): remove dead code 2025-05-10 10:42:32 +02:00
6b49d3ca14 refactor(parsing): remove old FromStr-based parser implementation 2025-05-04 18:25:42 +02:00
55b4779964 refactor(CommandParseError): remove the display implementation
we want to be able to give additional arguments to the display function later,
so this is needed
2025-05-04 13:45:09 +02:00
b8ed0868cb feat(CommandParseError): add ScanError variand with Into impl 2025-05-04 13:38:07 +02:00
32cfdfa07f tests(cmd): ensure wrong meta commands are recognized 2025-05-03 21:22:37 +02:00
848775587e tests(cmd): ensure wrong statements are recognized 2025-05-03 21:21:26 +02:00
92c50d6b65 tests(meta): ensure .exit works 2025-05-03 21:18:45 +02:00
47f174fb25 tests(cmd): ensure select statement works 2025-05-03 21:16:09 +02:00
75c3c74bba tests(cmd): ensure insert statement works 2025-05-03 21:14:52 +02:00
1f90d0acc3 refactor(command): display command results from special function 2025-05-03 21:10:03 +02:00
5b6d878208 refactor(command): generic execute and result type 2025-05-02 20:54:12 +02:00
ee23572983 refactor: pull things into own files, have a library 2025-05-02 20:43:55 +02:00