erick-alcachofa 0a3971f18e
refactor(ast): refactor AST printing to support DOT graph and improved string output
Signed-off-by: erick-alcachofa <erick@artichoke.dev>

This commit refactors the AST printing functionality by moving the
human-readable `toString` implementation into its own file
(`lib/src/Parser/AST/toString.cpp`) and introducing a new `toDot`
function in `lib/src/Parser/AST/toDot.cpp` for generating Graphviz DOT
format output.

The `AST.hpp` header is updated to declare both the new `toDot` function
and the modified `toString` function, which now uses an optional
`prefix` parameter for prettier tree output. The `Token.hpp`/`Token.cpp`
files are also adjusted to have `toString(const TokenV &)` return a
`std::string_view`, and `toString(const Token &)` provides a cleaner
string representation using only the token's value.
2025-10-19 21:54:24 -06:00
..
2025-03-04 12:50:53 -06:00