Commit graph

39 commits

Author SHA1 Message Date
45ce13ae99
semantic+main: add the BuiltinContext and use it as semantic root 2023-05-23 00:48:52 +02:00
159ee81375
semantic: refactor types and variable handling 2023-05-23 00:47:09 +02:00
98f0465238
semantic: add the concept of Types 2023-05-23 00:45:02 +02:00
7bb14210a7
ir: add IRNop and IRVoid action and value (resp.) 2023-05-23 00:37:36 +02:00
a832cd1214
treewide: make beartype optional 2023-05-15 00:33:25 +02:00
bac49d20d7
lexer: rename tokenizer to lexer, and convert to sequence 2023-05-14 23:22:38 +02:00
36b1fad7fe
parser+nodes+tokenizer: add Blocks 2023-05-12 01:37:54 +02:00
0ef9960230
parser+nodes+tokenizer: add Statements 2023-05-12 01:36:53 +02:00
2b9943cdbf
parser: make many visitors handle non-mandatory traversals 2023-05-12 01:32:07 +02:00
4ef1e63ee4
nodes: add PseudoNode to store fake nodes used to improve diagnostics 2023-05-12 01:30:02 +02:00
4929efa7b0
nodes: rework variable and fix its intermediate representation 2023-05-12 01:28:29 +02:00
15e8c2bee3
logger: improve type hints 2023-05-12 01:24:15 +02:00
b7ba27f29d
semantic: fix pretty printing + allow adding child contexts 2023-05-12 01:23:02 +02:00
c656a98d3e
nodes: prevent infinite recursion in repr 2023-05-12 01:22:00 +02:00
0c42eabde1
meta: add new run configuration to Jetbrains IDEs 2023-05-10 01:40:20 +02:00
1f2a8460a8
parser: fix bug when expression begins by a variable 2023-05-10 01:38:49 +02:00
5bf52edd44
main: allow giving custom input to compiler 2023-05-10 01:37:42 +02:00
017aefa750
logger+parser: add a Tracer class featuring function-wrappers and reflection
Generates clean function call stack traces as they are called
2023-05-10 01:21:59 +02:00
3e9d308e40
errors: add a OverrideMandatoryError
Use introspection and reflexion to automatically generate the error message.
2023-05-10 01:19:42 +02:00
855e86022b
meta: add IDE files 2023-05-09 01:58:49 +02:00
04a2c6237e
meta: add gitignore to filter-out all Python things 2023-05-09 01:56:41 +02:00
223c3be819
nodes+parser+semantic+ir: add variables
References + assignments
2023-05-09 01:54:47 +02:00
e9324f4f71
errors: init dedicated error file 2023-05-09 01:51:52 +02:00
4bc481ed54
ir+semantic: init intermediate representation generation 2023-05-08 23:14:53 +02:00
caffa92c1e
nodes: add source location to AST nodes 2023-05-08 23:13:00 +02:00
585910a60b
main: only print tokens if in debug mode 2023-05-08 23:10:45 +02:00
bd402beba7
source: add ordering to Location 2023-05-08 23:10:02 +02:00
5b3f0262a7
parser: add UnexpectedTokenError 2023-05-08 20:30:51 +02:00
1f21bcc89f
nodes: implement pretty printing 2023-05-08 19:29:20 +02:00
be9f389159
nodes+parser: refactor parsing of terms and factors
Make a distinction between Summation, Subtraction, Product and Division.
Also distinguish Integers and Floats
2023-05-08 19:29:20 +02:00
fd13900e9b
main+parser: greatly improve error reporting 2023-05-08 19:29:20 +02:00
272bed25b9
tokenizer: match newlines and improve location information
Use the generated newline tokens to know at what line a token is located.
2023-05-08 19:29:19 +02:00
86457c6972
tokenizer: improve token representation when value is None 2023-05-08 19:29:19 +02:00
9258b98a9a
logger: rewrite logger module
Make logging interface more pythonic
2023-05-08 19:29:19 +02:00
820fa1760d
source: greatly improve location reporting for multi-line source extracts 2023-05-08 19:29:19 +02:00
fc9b6b30c6
parser: fully rewrite parsing
Use a simpler and more direct recursive descent method.
2023-05-08 19:29:18 +02:00
14813a8bdf
main: fix formatting of print results 2023-05-08 19:29:18 +02:00
6e2391f973
rules: pass evaluation depth as a parameter 2023-05-08 19:29:18 +02:00
3d15b6dd63
meta: initial commit 2023-05-08 19:29:17 +02:00