a98f33e6d1
[meta] Reorganize order of use declarations - Phase 2
...
Some more rules:
- For module-level imports, prefer no prefix > super > crate.
- Use crate instead of super if super refers to the crate-level module
2024-10-17 15:57:33 +08:00
9fdbe9695d
[core] Add generator to SymbolResolver::get_symbol_value
...
Needed in a future commit.
2024-10-04 13:20:29 +08:00
fe06b2806f
[meta] Reorganize order of use declarations
...
Use declarations are now grouped into 4 groups:
- Declarations from the standard library
- Declarations from external crates
- Declarations from other crates in this project
- Declarations from within this module
Furthermore, all use declarations are grouped together to enhance
readability. super::super is also replaced by an equivalent crate::
declaration.
2024-10-04 12:52:01 +08:00
8fd7216243
[core] toplevel/composer: Add lateinit_builtins
...
This is required for the new core_log and rtio_log functions, which take
a generic type as its parameter. However, in ARTIQ builtins are
initialized using one unifier and then actually used by another unifier.
lateinit_builtins workaround this issue by deferring the initialization
of functions requiring type variables until the actual unifier is ready.
2024-08-13 15:19:03 +08:00
2194dbddd5
core/type_annotation: Refactor List type to TObj
...
In preparation for operators on lists.
2024-07-04 15:32:18 +08:00
82091b1be8
meta: Apply clippy changes
2024-06-17 14:10:31 +08:00
f026b48e2a
core: refactor to use TypeVarId
and TypeVar
2024-06-13 16:59:10 +08:00
8168692cc3
apply cargo fmt
2024-06-12 14:45:03 +08:00
12c0eed0a3
core: Fix compilation of tests
2024-01-17 09:49:49 +08:00
32746c37be
core: Refactor to return errors by HashSet
2023-12-12 15:41:59 +08:00
5182453bd9
meta: Remove redundant path prefixes
2023-12-11 15:16:23 +08:00
875d534de4
ast: Use {filename}:{row}:{col}
for location output
2023-12-08 15:48:54 +08:00
ebd25af38b
nac3standalone: allow classes without explicit init ( #221 )
...
Reviewed-on: #304
Co-authored-by: z78078 <cc@m-labs.hk>
Co-committed-by: z78078 <cc@m-labs.hk>
2022-07-07 10:36:25 +08:00
ca07cb66cd
format typevars consistently
2022-04-12 09:28:17 +08:00
26a4834254
fix warnings
2022-03-26 18:52:08 +08:00
63b0f29728
Fix broken tests
2022-03-05 00:27:51 +08:00
f97f93d92c
applied rustfmt and clippy auto fix
2022-02-21 18:27:46 +08:00
d9cb506f6a
nac3core: refactored for better error messages
2022-02-21 18:24:19 +08:00
352831b2ca
nac3core: removed legacy location definition
2022-02-13 22:39:24 +08:00
b18626b149
Fix compilation and test failures
2022-02-12 22:50:32 +08:00
ae8f82ccb0
nac3core: fix broken tests
2022-01-14 16:28:37 +08:00
9b3b47ce50
fix broken tests
2021-12-28 01:38:16 +08:00
66320679be
improve error messages
...
#112 , #110 , #108 , #87
Reviewed-on: #145
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2021-12-22 08:52:19 +08:00
1c31aa6e8e
consistent naming
2021-12-02 10:45:46 +08:00
4b17511b4a
Merge branch 'master' into KernelInvariant
2021-11-27 21:29:27 +08:00
4587088835
Constant Default Parameter Support ( #98 )
...
Add support for constant default parameter
Reviewed-on: #98
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2021-11-23 07:32:09 +08:00
ba08deada6
nac3core: refactor codegen
2021-11-20 19:50:25 +08:00
8dbb4ad58a
nac3core/toplevel: make test less fragile
...
test results should not depend on internal states if possible
2021-11-05 20:28:21 +08:00
bf7e2c295a
integrate nac3parser
2021-11-03 17:11:00 +08:00
c4259d14d1
fixed some clippy warnings
2021-10-16 18:08:13 +08:00
11144301ca
nac3artiq: added simple host value support
2021-10-06 16:07:42 +08:00
f5ce1afe0b
fix tests and switch to insta
...
Use a library called 'insta' to better organize those longer correct test outputs in toplevel tests. 'insta' creates `.snap` files as snapshots of the test output, and will automatically do the diff if the output is different. This makes maintaining test cases with larger outputs a lot easier.
Reviewed-on: #42
Co-authored-by: ychenfo <yc@m-labs.hk>
Co-committed-by: ychenfo <yc@m-labs.hk>
2021-10-03 16:39:12 +08:00
084efe92af
nac3core: use string interning
2021-09-22 18:04:06 +08:00
1c170f5c41
nac3core: type inferencer fix the pass statement
2021-09-21 13:19:13 +08:00
20905a9b67
nac3core: better field initialization check
2021-09-21 03:02:12 +08:00
dd1be541b8
nac3core: allow class to have no __init__, function/method name with module path added to ensure uniqueness
2021-09-20 23:36:19 +08:00
35a94a8fc0
nac3core: fix broken test
2021-09-20 01:58:07 +08:00
2b74895b71
nac3standalone, nac3core: can use top level composer to compile and run mandelbrot
2021-09-19 16:19:49 +08:00
ed5dfd4100
nac3core: top level inferencer call with type var more test
2021-09-17 16:31:33 +08:00
41e63f24d0
nac3core: top level add test utility to print stringfied type
2021-09-17 16:31:21 +08:00
d0df705c5a
nac3core: toplevel type var test
2021-09-17 00:39:42 +08:00
a0662c58e6
nac3core: fix recursive top level function call
2021-09-17 00:39:42 +08:00
526c18bda0
nac3core: top level inferencer without type var should be ok
2021-09-17 00:39:42 +08:00
471547855e
nac3core: toplevel change class method name handling, cleanup comments
2021-09-12 13:14:46 +08:00
cb310965b8
nac3core: toplevel register consider module path
2021-09-12 05:00:26 +08:00
118f19762a
nac3core: toplevel format
2021-09-12 04:40:40 +08:00
b419634f8a
nac3core: top level fields inheritance check, more tests
2021-09-12 04:34:30 +08:00
147298ff40
nac3core: top level fix class fields as nac3 spec
2021-09-12 03:49:21 +08:00
c7cb02b0f3
nac3core: toplevel fix parse type annotation dead lock
2021-09-12 03:01:56 +08:00
4eacd1aa9e
nac3core: top level err test
2021-09-10 21:26:39 +08:00