186 Commits

Author SHA1 Message Date
316500484a
Merge branch 'master' into type-checker 2025-02-07 00:24:06 +00:00
bc5f28ab52
fix: disallow unknown type assignments and reads 2025-02-07 00:23:41 +00:00
277d2f66af
fix: check function calls have correct number of args 2025-02-07 00:09:10 +00:00
e57c89beec
fix: extract retType from KnownType.Func when type-checking function bodies 2025-02-06 23:59:13 +00:00
f6e734937f
feat: implement satisfies function in type checker
Co-Authored-By: jt2622
2025-02-06 21:04:27 +00:00
4dc07c249a refactor: implemented labelAndExplain(), combining label and explain, and...
Merge request lab2425_spring/WACC_37!9

Co-authored-by: Barf-Vader <47476490+Barf-Vader@users.noreply.github.com>
Co-authored-by: Guy C <gc1523@ic.ac.uk>
2025-02-06 20:30:20 +00:00
6548d895d5
feat: type checker without satisfies implemented
Co-Authored-By: jt2622
2025-02-06 20:26:15 +00:00
0e2d1af878 refactor: add comments to renamer 2025-02-06 19:55:52 +00:00
74f62ea933 fix: fix merge breaks, add function names to scope before renaming bodies 2025-02-06 19:55:52 +00:00
ae9625b586 fix: use apply() instead of get() for Maps 2025-02-06 19:55:52 +00:00
30cf42ee3a fix: separate variable and function in scope 2025-02-06 19:55:52 +00:00
3fbb90322f feat: renamer maybe maybe maybe maybe 2025-02-06 19:55:52 +00:00
e9ed197782 fix: remove unused applyCon from AST 2025-02-06 19:55:52 +00:00
6d1c0b7a87 fix: make parser use only parsley parser bridge apply 2025-02-06 19:55:52 +00:00
1486296b40 refactor: add position tracking to AST, UnaryOp, BinaryOp 2025-02-06 19:54:16 +00:00
Barf-Vader
bd779931b6 refactor: style fixes in parser
Co-authored-by: gc1523
2025-02-06 19:54:16 +00:00
Barf-Vader
8b64f2e352 fix: removed redundant labelling in ast
Co-authored-by: gc1523
2025-02-06 19:54:16 +00:00
Barf-Vader
19880321d7 feat: implemented lexer-backed error builder, error messages are now based on predefined tokens
Co-authored-by: gc1523
2025-02-06 19:54:16 +00:00
Barf-Vader
e787d7168f refactor: implemented labelAndExplain(), combining the two, and provided explanations for expr
Co-authored-by: gc1523
2025-02-06 19:53:48 +00:00
Jonny
88ec08a023 feat: basic type checker skeleton 2025-02-06 17:07:55 +00:00
2fb520d891 feat: scope checker and renamer
Merge request lab2425_spring/WACC_37!8
2025-02-06 17:02:31 +00:00
Guy C
ded35dcc6e feat: improved error messages for atom types 2025-02-06 15:36:24 +00:00
5210a55d9e
refactor: add comments to renamer 2025-02-05 22:03:26 +00:00
0f18bca7fd
fix: fix merge breaks, add function names to scope before renaming bodies 2025-02-05 20:41:49 +00:00
6027bea95e
fix: use apply() instead of get() for Maps 2025-02-05 18:12:26 +00:00
8c5b85b8c2
fix: separate variable and function in scope 2025-02-05 18:12:26 +00:00
06c8a069fb
feat: renamer maybe maybe maybe maybe 2025-02-05 18:12:25 +00:00
Connolly, Guy
5f7a89b47f refactor: add position tracking to AST, UnaryOp, BinaryOp
Merge request lab2425_spring/WACC_37!7

Co-authored-by: Gleb Koval <gleb@koval.net>
2025-02-05 17:42:58 +00:00
539403fd36
fix: remove unused applyCon from AST 2025-02-05 04:49:05 +00:00
5fffd01a6f
fix: make parser use only parsley parser bridge apply 2025-02-05 04:47:43 +00:00
f3a59460ef
refactor: add position tracking to AST, UnaryOp, BinaryOp 2025-02-05 02:12:16 +00:00
Guy C
057d625464 fix: style fixes 2025-02-04 17:13:56 +00:00
Guy C
4602b75628 feat: improved error messages 2025-02-04 17:03:46 +00:00
Guy C
4e50ed35ba feat: more error messages 2025-02-04 03:32:52 +00:00
Guy C
3c23654356 fix: remove redundant imports 2025-02-04 03:06:56 +00:00
Guy C
5016fefc14 feat: lexer implements ErrorConfig for improved error messages 2025-02-04 03:02:37 +00:00
3aae08ffd4
feat: implement CLI for parser 2025-02-02 13:48:54 +00:00
d4b410bca9 feat: implement parser
Merge request lab2425_spring/WACC_37!6

Co-authored-by: Jonny <j.sinteix@gmail.com>
2025-02-02 13:45:25 +00:00
1bb4939fcd
Merge branch 'master' into parser 2025-02-02 13:41:12 +00:00
feac5efb6a feat: implement abstract syntax tree
Merge request lab2425_spring/WACC_37!4

Co-authored-by: Jonny <j.sinteix@gmail.com>
2025-02-02 13:37:48 +00:00
41d541050f feat: implement lexer
Merge request lab2425_spring/WACC_37!5

Co-authored-by: Jonny <j.sinteix@gmail.com>
2025-02-02 13:37:36 +00:00
da4b398bf0
fix: do not allow negation of a positive int literal 2025-02-02 13:30:33 +00:00
2588c8287d
fix: change lhs of Assign to lvalue 2025-02-02 00:33:16 +00:00
03fdbe01d9
fix: put functions "(" within atomic 2025-02-02 00:30:18 +00:00
b5a1f2565f
Revert "fix: add function must return on all paths check"
This reverts commit a71045867a9de128b2458cd332d97a09c49c2b4a.
2025-02-02 00:27:04 +00:00
cb9796fa87
feat: show exact statement which must be returning at the end of a function 2025-02-02 00:00:09 +00:00
a71045867a
fix: add function must return on all paths check 2025-02-01 21:22:48 +00:00
0db7a30af0
refactor: remove excessive atomics 2025-02-01 21:05:42 +00:00
a110225c49
Merge branch 'ast' into parser 2025-02-01 20:56:03 +00:00
993acddad3
Merge branch 'master' into lexer 2025-02-01 20:55:22 +00:00