4 Commits

Author SHA1 Message Date
b99f3586dc
chore(license): Added NOTICE header to all source files
Signed-off-by: erick-alcachofa <erick@artichoke.dev>
2025-12-25 13:12:41 -06:00
583b20230d
fix(Utils): Inherit from Ts in OverloadSet
Signed-off-by: erick-alcachofa <erick@artichoke.dev>

This commit changes the `OverloadSet` utility class to publicly inherit
from its template parameters `Ts...`. This allows the `operator()` from
each provided type to be brought into the overload set, efectively
fixing it's functionality that would be broken otherwise.

It also includes the missing `<ranges>` header in the test utilities.
2025-10-15 16:02:27 -06:00
bb58b17528
fix: Fixed typo in keyword and added missing do and typename keywords
Signed-off-by: erick-alcachofa <erick@artichoke.dev>
2025-10-04 10:35:03 -06:00
e1b9e054f3
feat(test, tokenizer): Add test suite, in Tokenizer fixed catched issues and range-based API
Signed-off-by: erick-alcachofa <erick@artichoke.dev>

This commit introduces a comprehensive test suite for the tokenizer
using the Catch2 framework. To support this and improve the project
structure, the build system and the tokenizer's API have been
significantly updated.

- Removed `cmake/testing.cmake` as it's no longer needed.
- A new `TokenizerRange` class provides a C++20-style range interface,
  allowing for simple `for-each` loop iteration over tokens. This is
  used extensively in the new tests.

- The CMake build system has been refactored:
    - An `ENABLE_TESTING` option (OFF by default) now controls whether
      the test suite is built.
    - The core library is now compiled into an object library, which is
      then used to produce both a shared (`.so`/`.dll`) and a static
      (`.a`/`.lib`) library. This improves build efficiency and provides
      more flexible linkage options.
    - The frontend executable now links against the static version of
      the library.

- Implemented tests for tokenizer using Catch2 framework, covering
  various cases like identifiers, keywords, numbers, etc. that already
  catched some issues in current implementation.

- Several parsing bugs and edge cases in the tokenizer were fixed,
  including the handling of unterminated strings and invalid numeric
  literals. The README has been updated with instructions for building
  and running tests.
2025-10-03 12:54:41 -06:00