Commit Graph

221 Commits

Author SHA1 Message Date
CHatingPython 02ce25df2d refactor(AST): improve AST node print operator 2026-06-03 16:10:35 +02:00
CHatingPython ab6b65a70e refactor(result): add print operator to result
Fixes #6
2026-06-03 16:06:59 +02:00
Aleksander Krajewski 1b9514c49c Merge pull request #7 from CHatingPython/remove-handle
Remove handle
2026-06-03 14:14:38 +02:00
CHatingPython d50bfc868f refactor(AST): improve literals
Changed literal node to templated class and literals to aliases.
2026-06-03 14:13:28 +02:00
CHatingPython 52537e0955 refactor(AST): node location
Add location function to node and introduce a new abstract_node class.

Refs: #1
2026-06-03 13:47:01 +02:00
CHatingPython 9b92c06d87 refactor(handle): remove handle
Refs: #1
2026-06-03 11:59:36 +02:00
CHatingPython af982c11ed refactor(parser): change node handles to node results
Refs: #1
2026-06-03 11:57:09 +02:00
CHatingPython a1b5726271 refactor(handle): remove non-pointer handle
Previous commit rendered it obsolete.

Refs: #1
2026-06-03 11:10:01 +02:00
CHatingPython d1e32baffe refactor(parser): change value and name handles to results
Refs: #1
2026-06-03 11:08:51 +02:00
CHatingPython cf9c53a9e8 refactor(parser): add print operator to AST error 2026-06-03 10:53:34 +02:00
CHatingPython 26340c279d refactor(parser): change body_h to body result
Refs: #1
2026-06-03 10:45:57 +02:00
CHatingPython 6ce2fba9d2 docs: document token error 2026-06-03 10:43:25 +02:00
CHatingPython cb7a348540 refactor(lexer): change token_handle to token result
Refs: #1
2026-06-02 16:49:40 +02:00
CHatingPython 3491f9aebb refactor(result): add value comparison operators 2026-06-02 16:03:38 +02:00
Aleksander Krajewski d422b80907 Merge pull request #4 from CHatingPython/docs
Add doxygen documentation
2026-06-02 14:01:39 +02:00
CHatingPython 66a46d8b88 docs: document IR 2026-06-02 13:57:23 +02:00
CHatingPython fd98474a86 docs: document result 2026-06-02 13:16:55 +02:00
CHatingPython 7ac994511c docs: document arena allocator 2026-06-02 12:56:58 +02:00
CHatingPython 9eb7d0c68f docs: document parser 2026-06-02 12:47:51 +02:00
CHatingPython 16ca41b75a docs: document lexer 2026-06-02 12:41:36 +02:00
CHatingPython 1f4d0b992d docs: document location 2026-06-02 12:30:18 +02:00
CHatingPython 72dc7777fb docs: document token 2026-06-02 12:28:39 +02:00
CHatingPython dd6344aab6 docs: document AST nodes 2026-06-02 12:12:48 +02:00
CHatingPython ece2df477a docs: tweak doxygen settings 2026-06-02 10:55:28 +02:00
CHatingPython a277ae570b docs: add doxygen support 2026-06-02 10:17:52 +02:00
CHatingPython e47cb4569e docs: add the formalities
I don't speak english, sorry
2026-06-01 23:56:15 +02:00
Aleksander Krajewski 4faff6b75a Merge pull request #3 from CHatingPython/irgen
IR generation
2026-06-01 23:27:39 +02:00
CHatingPython 18d99d4a86 test(lexer): refactor the test suite to use fixtures
Shoutout to my man - Krotek-man for giving me this awesome tip. I guess you really could say that the student became master. Also shoutout to stasiu for giving me his tip.
2026-06-01 23:07:55 +02:00
CHatingPython 270a3394e4 fix(result, furlang): fix value construction for error result constructor 2026-06-01 23:05:21 +02:00
CHatingPython af10dfcd40 refactor(parser): organize the includes 2026-06-01 21:28:00 +02:00
CHatingPython 6775ddf7d4 fix(furlang): use std::free() instead of delete in arena 2026-06-01 21:14:56 +02:00
CHatingPython 62619cd0bc refactor(IR)!: change IR block structure
It now requires an exit instruction.
2026-06-01 18:27:36 +02:00
CHatingPython de49674f81 refactor(IR): add branch instruction on block exit in if statement 2026-06-01 18:11:38 +02:00
CHatingPython 045ce7be59 fix(IR): use register operands instead of variable for local variables 2026-06-01 18:06:03 +02:00
CHatingPython 011e0e8bad refactor(furc): introduce ir_register type 2026-06-01 17:47:40 +02:00
CHatingPython b6e5f1f5cc refactor(furc): mark AST nodes as final 2026-06-01 17:44:40 +02:00
CHatingPython 6ffe1cefbe refactor(furc): rename some token types to PascalCase 2026-06-01 17:37:36 +02:00
CHatingPython 0958389b90 refactor(furc): unify visit functions in AST visitor 2026-06-01 17:28:40 +02:00
CHatingPython 7caaaac4a0 feat(furc): add compound statement
This one: { [statement]... }
2026-06-01 17:23:00 +02:00
CHatingPython 55f4435670 fix(furc): bring back the LIBFURC guard to main.cpp 2026-05-31 20:12:23 +02:00
CHatingPython 646d185d40 Implement basic IR generator
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:53 +02:00
CHatingPython 9b1a7d5a0b Implement var read and assign IR
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:53 +02:00
CHatingPython 91ef7f01a4 Add if statement
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:53 +02:00
CHatingPython f431d9b725 Fix AST visitor
Add default constructor

Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:52 +02:00
CHatingPython 6eb689bfb9 Fix and rename branch_nz to branch_cond in furlang IR
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:52 +02:00
CHatingPython b2e33e1bdd Add AST visitor
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:52 +02:00
CHatingPython 2395ee9977 Forward furc ast
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:52 +02:00
CHatingPython dfcbc4f23b Add IR instruction and block to furlang
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:52 +02:00
CHatingPython 28656fdf90 Add IR operand to furlang
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:52 +02:00
CHatingPython 82c9037a6a Add result to furlang
Signed-off-by: CHatingPython <chatingpython@gmail.com>
2026-05-31 19:16:52 +02:00