Commit Graph

10 Commits

Author SHA1 Message Date
seeseemelk bfb3b69be1 fix: add util.c to source files 2026-04-26 22:48:31 +02:00
seeseemelk 129036b539 Fix all valgrind errors 2026-04-26 22:13:39 +02:00
seeseemelk dbc69eddc8 Update test target to use valgrind 2026-04-26 21:35:14 +02:00
seeseemelk a89e61eedd Introduce golden file mechanism for tests 2026-04-24 21:09:47 +02:00
seeseemelk 0e826e05e1 Add log framework 2026-04-24 15:14:15 +02:00
seeseemelk a173e37adc Implement parser module and update AST 2026-04-24 14:50:54 +02:00
seeseemelk dccdcb8ba5 Implement token.c with comprehensive tests and easy-to-modify token mapping
- Created token-to-string mapping array parallel to Token enum in token.c
- Implemented TokenStream with lookahead buffering for proper tokenization
- Implemented tokenstream_open/close/next functions with support for:
  - Keywords (module, import, void)
  - Symbols (parentheses, brackets, comma, semicolon)
  - Identifiers (alphanumeric starting with letter or underscore)
  - Comment skipping (// style)
  - Whitespace handling
- Added token_to_string function to token.h for token inspection
- Created comprehensive test suite (15 tests) covering all token types and edge cases
- All tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 09:35:18 +02:00
seeseemelk c90f3afd95 Implement all @copilot Makefile and buffer test annotations
- Defined V0_SRC_DEPS and V0_TEST_DEPS in v0/include.mk
- Updated clean rule to remove dependency files
- Referenced dependency variables for .d includes
- Added and deduplicated file-read test in v0/test_buffer.c

All tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 09:25:04 +02:00
seeseemelk 7ff3f76de5 Implement buffer interface and tests
- Implement buffer_open_file/string, buffer_read, buffer_close in v0/src/buffer.c

- Add tests in v0/tests/test_buffer.c and test_buffer.txt; register tests in v0/tests/test.c

- Update v0/include.mk and Makefile

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 08:07:38 +02:00
seeseemelk f6a1b290fc Initial commit 2026-04-24 07:24:03 +02:00