7ccda2e69b
Fix segfault when CField
has been substituted
2024-01-21 02:01:55 +01:00
a2701257dd
Prevent infinite loops when checking something like "foo".0.1.2
2024-01-21 01:56:01 +01:00
f2550e9430
git: Add compile_command.json to .gitignore and update comment
2024-01-21 01:51:25 +01:00
3979a9010b
Dont let Diagnostic
inherit from std::runtime_error
...
We are not using exceptions
2024-01-21 01:12:02 +01:00
25ccf60e02
Make VSCode launch test sandbox Bolt code by default
2024-01-21 01:11:29 +01:00
3942004f76
Switch to field constraints instead of TTupleIndex
2024-01-21 01:10:59 +01:00
4ab4094acc
Add sample CMake invocation to README.md
2024-01-21 00:20:04 +01:00
4e11af005c
Make Type
a union and fix checking of tuple access
2024-01-21 00:18:09 +01:00
75124d097b
Update link to Zen project
2024-01-20 20:09:14 +01:00
135b0cd6e9
Update README for C++ subproject
2024-01-15 14:27:41 +01:00
285f33e93c
Add 'bootstrap/cxx/' from commit '7c1a929e9a3d3abb1e2113f531588e059ad5be8c'
...
git-subtree-dir: bootstrap/cxx
git-subtree-mainline: b732e418cb
git-subtree-split: 7c1a929e9a
2024-01-15 14:04:51 +01:00
b732e418cb
Update examples in README.md
2024-01-15 13:57:38 +01:00
c157a5e6ec
Move JavaScript-based compiler to bootstrap/js
2024-01-15 13:56:07 +01:00
7c1a929e9a
Remove hard dependency on LLVM in code
2024-01-15 11:53:44 +01:00
7eed7998e8
Rename UniVar to RegularVar
2023-08-30 12:07:53 +02:00
0d7b7fec8d
Remove some unused imports
2023-08-13 15:43:10 +02:00
0faea35446
Make let-declarations in type class declarations always functions
2023-08-13 15:42:48 +02:00
e92e346bad
Decouple type checking info from CST and refactor checker.ts a bit
2023-08-12 13:46:19 +02:00
aa386f2e79
Add tests to source control
2023-08-11 12:29:14 +02:00
27d25fb849
Make example in README.md copy-pastable
2023-08-10 15:20:34 +02:00
b08bdbc6f7
Add a test for a large mutual recursion
2023-08-10 13:17:01 +02:00
859b1676fd
Clean up type checking code a bit
2023-08-02 10:37:13 +02:00
89feeaadb6
Remove reference to TNominal in checker.ts
2023-07-28 20:42:24 +02:00
985e2d0652
Improve handing of struct/enum types and declarations
...
Also removes TNominal from the list of types because it is redundant
w.r.t. TCon.
2023-07-04 20:38:40 +02:00
bd4ed57c46
Add support for verifying diagnostic messages
2023-07-01 01:26:18 +02:00
3cfb816d6a
Remove obsolete console.log-statement in scope.ts
2023-07-01 01:25:55 +02:00
996a2f8928
Disable browser APIs in TypeScript project
2023-07-01 01:25:18 +02:00
eaaa258fbd
Fix type checking bug in 'bolt verify' command
2023-06-30 20:35:48 +02:00
7a0cb6753a
Add a 'verify' command, ...
...
- Add a command to check the integrity of the compiler
- Add a diagnostic when a tuple index is out of bounds
- Make 'build' the default command
- ...
2023-06-30 19:30:42 +02:00
d194ff9b2e
Fix rigid type vars not instantiating correctly by introducing
...
union-find
2023-06-28 22:09:17 +02:00
8d2f3c4977
Remove (de)serialization logic
2023-06-26 19:02:23 +02:00
650cecb707
Add rigid type vars and some other enhancements
...
- Add TRigidVar as a type
- Make VarTypeExpression generate a TRigidVar
- Rename `TVar` to `TUniVar`
- Make kind checker use `kindOfType` instead of `new KType()`.
2023-06-26 18:54:20 +02:00
91a4872c34
Merge solver back with checker and apply algorithm for eager constraint
...
solving
2023-06-22 16:19:51 +02:00
2f9b6db5af
Adjust the way let-declarations are visited in the type-checker
...
Let-declarations are now roughly visited in the order they are
referenced, resulting in constraints being propagated in the same way.
2023-06-22 15:30:14 +02:00
6df807440a
Upgrade dependencies and check in package-lock.json
2023-06-21 16:58:02 +02:00
f58011e50e
Refactor by splitting into multiple files
2023-06-21 16:56:04 +02:00
935420d418
Fix bug in lexing a word directly after an empty comment
2023-06-15 16:40:28 +02:00
8b1263c376
Revert "Make it possible to nest match-expressions"
...
This reverts commit ac7467bccb
.
The commit breaks too much syntax.
2023-06-15 16:29:35 +02:00
ac7467bccb
Make it possible to nest match-expressions
...
Although this fixes #46 , this introduces a new bug for expressions that
require punctuation to be turned off. We will adress this in a separate
issue.
2023-06-12 22:00:46 +02:00
8addcb0990
Add some more automated test snippets
2023-06-12 16:54:41 +02:00
a3f40d51ef
Some enhancements in the parser
...
- Fix MemberExpression and IfStatementPart not receiving annotations
- Enable parsing of elif-statements
- Refactor some code
2023-06-12 16:53:26 +02:00
2be3deb5f6
Add missing ConsolePrinter.hpp and ConsolePrinter.cc
2023-06-12 16:52:10 +02:00
35bcf38eb3
Only create scope in LetDeclaration if it is a function
2023-06-12 16:50:55 +02:00
d81e92231f
Some minor enhancements
...
- Make if-elif-else possible
- Add more tests
- Ensure that failed tests fail tools like xargs
- Refactor printing logic out of ConsoleDiagnostics
2023-06-11 11:04:04 +02:00
d278456290
Add experimental support for compiler annotations
2023-06-08 20:27:01 +02:00
c0c36ca698
Add the missing very basic evaluatator
2023-06-06 17:30:24 +02:00
abae39c791
Move all tests to test/ improve Checker tests
2023-06-06 17:28:56 +02:00
0326bbe7f9
Record variant constructors for future use
2023-06-05 15:53:24 +02:00
d0b9c9702b
Fix simplifyType not expanding to the full solution
2023-06-05 15:51:40 +02:00
1147c751b9
Introduce new algorithm for better handling of recursive functions
2023-06-05 15:51:04 +02:00