Tom Hvitved
938e962d79
Merge remote-tracking branch 'upstream/main' into aibaars/rust-comments
2024-09-30 16:42:22 +02:00
Tom Hvitved
2018b6361d
Rust: Accept CFG inconsistencies
2024-09-30 15:45:15 +02:00
Arthur Baars
45d3d381f5
Rust: test cases for comments
2024-09-30 15:38:59 +02:00
Arthur Baars
fd459be165
Rust: add Comment to schema
2024-09-30 15:38:54 +02:00
Tom Hvitved
5ae669937c
Rust: Add labelled block example
2024-09-30 14:47:13 +02:00
Tom Hvitved
3e77dd8b6b
Rust: Fix extraction errors
2024-09-30 10:36:56 +02:00
Tom Hvitved
bafef791f7
Rust: Add extraction error consistency query
2024-09-30 10:28:24 +02:00
Tom Hvitved
431b33a274
Rust: Implement LiteralExpr::toString()
2024-09-27 13:33:25 +02:00
Tom Hvitved
90869ec96a
Merge pull request #17558 from hvitved/rust/cfg-consistency-queries
...
Rust: Enable CFG consistency checks
2024-09-25 15:14:44 +02:00
Tom Hvitved
cbc2389493
Rust: Accept CFG inconsistencies
2024-09-25 10:56:46 +02:00
Tom Hvitved
3bd5c6e445
Rust: Implement {BinaryExpr,PrefixExpr}.toString()
2024-09-25 10:55:15 +02:00
Arthur Baars
5714811071
Rust: fix panic when the last character in a range is multi-byte
2024-09-24 19:26:02 +02:00
Arthur Baars
69a172c7ba
Rust: accept trivial expected output
2024-09-20 15:51:06 +02:00
Arthur Baars
db06ad2ac3
Rust: codegen
2024-09-20 15:51:03 +02:00
Arthur Baars
e6e0e6eb66
Rust: accept expected output
2024-09-20 15:51:01 +02:00
Arthur Baars
a9423f4bdb
Rust: codegen
2024-09-20 15:50:59 +02:00
Arthur Baars
80d32a2333
Rust: re-generate code
2024-09-19 13:00:46 +02:00
Tom Hvitved
43c0bd36be
Rust: Run code generator
2024-09-18 13:48:02 +02:00
Tom Hvitved
4dd3059f16
Rust: Run code generator
2024-09-16 13:39:55 +02:00
Arthur Baars
90537f9132
Fix other QL code
...
This reverts commit 5c02fb4a2e .
2024-09-13 18:47:10 +02:00
Arthur Baars
3fdc49c4cb
Rename Literal, Type, and BinExpr
2024-09-13 18:33:55 +02:00
Arthur Baars
ebe1e5e0d2
Fix locations for Path and LiteralOrConstPat
2024-09-13 18:23:39 +02:00
Arthur Baars
661a4e07be
Merge remote-tracking branch 'upstream/main' into aibaars/rust-doc-tests
2024-09-13 17:31:38 +02:00
Arthur Baars
d73d90dba2
Avoid use of plain 'None' in tests
...
For some reason the parser resolves the ambiguity between None as a PathPat or IdentPat
differently on the Action runners vs local machine.
2024-09-13 12:48:58 +02:00
Arthur Baars
e46ad61bb8
Update test data
2024-09-13 11:16:25 +02:00
Arthur Baars
d99c2031ac
Workaround nameclash in dbscheme generator
2024-09-13 11:07:02 +02:00
Arthur Baars
fa9cfc1104
Regenerate code
2024-09-13 10:52:43 +02:00
Arthur Baars
452424a0d2
Fix tests for Path and TypeRef
2024-09-13 10:25:36 +02:00
Arthur Baars
085aad3b3c
Update test data
2024-09-13 10:22:01 +02:00
Arthur Baars
197fb04184
Improve docs
2024-09-13 10:16:34 +02:00
Arthur Baars
c825ae4eab
Add some examples for some of the unimplemented nodes
2024-09-12 22:18:02 +02:00
Arthur Baars
8e378d86df
Update test data
2024-09-12 22:18:00 +02:00
Arthur Baars
7572546efa
Improve handling of unimplemented nodes
2024-09-12 22:17:39 +02:00
Arthur Baars
69761a2942
Rust: AST: add docs with examples for qltest
2024-09-12 19:54:37 +02:00
Arthur Baars
2a88086544
Rust: AST: add docs with examples for qltest
2024-09-12 17:58:15 +02:00
Paolo Tranquilli
b4b680775c
Rust: integrate into standard files+location library
2024-09-12 13:17:10 +02:00
Paolo Tranquilli
aeae922ef3
Rust: make ql tests extract files together
...
For the moment this removes the possibility to set custom flags or env
variables for the extractor via comments, but that can be added back
easily if needed with a different mechanism (like an `env` file).
2024-09-12 09:13:35 +02:00
Paolo Tranquilli
4f90f5fb4c
Rust: accept test changes
2024-09-10 17:36:18 +02:00
Paolo Tranquilli
9c8f6145ab
Merge pull request #17408 from github/aibaars/rust-experiment
...
Rust: add partial extractor for Expr, Statement, Pattern
2024-09-10 17:09:47 +02:00
Arthur Baars
a5d1d9e167
Make implementation more complete
...
Use Unimplemented to mark AstNodes that need implementing
2024-09-10 14:13:05 +02:00
Paolo Tranquilli
ef06b555c1
Rust: accept test changes
2024-09-10 11:29:54 +02:00
Paolo Tranquilli
56e127849f
Rust/Codegen: fix generated list files
2024-09-09 12:31:09 +02:00
Paolo Tranquilli
10a23c0843
Merge branch 'rust-experiment' into redsun82/rust-doctest-gen
2024-09-09 12:20:55 +02:00
Paolo Tranquilli
ac9e977baa
Rust: remove accidental test source file
2024-09-06 14:29:10 +02:00
Paolo Tranquilli
18c423eb55
Rust: fix formatting of code snippet in docstring
2024-09-06 14:27:57 +02:00
Paolo Tranquilli
6111a7497d
Rust: remove accidental schema annotation
2024-09-06 14:26:36 +02:00
Paolo Tranquilli
8c5cc2efdc
Rust: generate test code from schema docstrings
...
This generates test source files from code blocks in class docstrings.
By default the test code is generated as is, but it can optionally:
* be wrapped in a function providing an adequate context using
`@rust.doc_test_function(name, *, lifetimes=(), return_type="()", **kwargs)`,
with `kwargs` providing both generic and normal params depending on
capitalization
* be skipped altogether using `@rust.skip_doc_test`
So for example an annotation like
```python
@rust.doc_test_function("foo",
lifetimes=("a",),
T="Eq",
x="&'a T",
y="&'a T",
return_type="&'a T")
```
will result in the following wrapper:
```rust
fn foo<'a, T: Eq>(x: &'a T, y: &'a T) -> &'a T {
// example code here
}
```
2024-09-06 14:24:42 +02:00
Arthur Baars
46d6bbb458
Rust: update generated code
2024-09-05 16:59:29 +02:00
Paolo Tranquilli
885e89a927
Rust: first running tests
2024-08-30 17:45:51 +02:00
Paolo Tranquilli
590a146b49
Rust: some basic extraction of function names (with locations!)
2024-08-29 17:58:50 +02:00