Arthur Baars
37f264df74
Rust: correct line and column numbers in printed error messages
2024-09-24 17:34:32 +02:00
Arthur Baars
b04abc09f0
Rust: extract syntax errors
2024-09-24 17:34:26 +02:00
Arthur Baars
d14e77ba48
Address comments
2024-09-24 14:09:23 +02:00
Arthur Baars
7b4137fbc8
Rust: generate the extractor
2024-09-20 19:24:55 +02:00
Arthur Baars
80d32a2333
Rust: re-generate code
2024-09-19 13:00:46 +02:00
Arthur Baars
9104c3fc81
Rust: re-generate schema and extractor
2024-09-19 13:00:45 +02:00
Arthur Baars
1f30d5f41b
Rust: generate schema.py and extractor from ungrammar
2024-09-19 13:00:05 +02:00
Paolo Tranquilli
5432493945
Rust: log detected manifests
2024-09-17 15:35:26 +02:00
Paolo Tranquilli
89a8cbc536
Rust: use shared path utilities
2024-09-17 12:27:57 +02:00
Paolo Tranquilli
de4ab44e06
Merge branch 'main' into redsun82/rust-unextracted
2024-09-16 17:10:26 +02:00
Paolo Tranquilli
1ce4707ff9
Merge branch 'main' into redsun82/rust-typed-labels
2024-09-16 16:44:55 +02:00
Paolo Tranquilli
d1704cfb14
Merge pull request #17444 from hvitved/rust/final-classes
...
Rust/Swift: Make all public AST classes `final`
2024-09-16 16:42:40 +02:00
Tom Hvitved
4dd3059f16
Rust: Run code generator
2024-09-16 13:39:55 +02:00
Paolo Tranquilli
ece815750e
Merge branch 'main' into redsun82/rust-typed-labels
2024-09-16 10:51:07 +02:00
Paolo Tranquilli
f1233b14e8
Rust: fix generated hierarchy
2024-09-16 10:06:01 +02:00
Paolo Tranquilli
cb53911224
Merge branch 'main' into redsun82/rust-cli-flags
2024-09-16 09:36:06 +02:00
Arthur Baars
7f8bb7e859
Apply clippy fixes
2024-09-13 19:00:28 +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
Paolo Tranquilli
8f93f5e34b
Rust: move to Label<T> and mark unsafety of from_untyped
2024-09-13 17:17:19 +02:00
Paolo Tranquilli
faf1eeeb0d
Rust: introduce typed labels
2024-09-13 13:57:14 +02:00
Paolo Tranquilli
23dd572d5e
Rust: add CODEQL_ base env layer
2024-09-13 13:39:39 +02:00
Arthur Baars
d99c2031ac
Workaround nameclash in dbscheme generator
2024-09-13 11:07:02 +02:00
Arthur Baars
b0939cfffa
Update extractor
2024-09-13 10:58:01 +02:00
Arthur Baars
fa9cfc1104
Regenerate code
2024-09-13 10:52:43 +02:00
Arthur Baars
c634b0a000
Don't extract non-source crates
2024-09-13 10:16:53 +02:00
Paolo Tranquilli
403cc3df90
Rust: avoid cli flag defaults overriding env settings
2024-09-13 06:50:12 +02:00
Arthur Baars
7572546efa
Improve handling of unimplemented nodes
2024-09-12 22:17:39 +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
5ae8824303
Rust: add context to parameter file expansion errors
2024-09-12 08:56:07 +02:00
Paolo Tranquilli
6adf88542e
Rust: fix linting script
2024-09-12 08:53:08 +02:00
Paolo Tranquilli
0a8c0f5ab4
Rust: fix bazel build
2024-09-12 08:46:50 +02:00
Paolo Tranquilli
1b3a5cdab1
Rust: make the cli flags override automatic
...
This makes the clap flags overlay over `Config` entirely derived via an
attribute macro. Also, the `--intputs-file` option is replaced by a more
standard and versatile `@` parameter file mechanism.
2024-09-11 17:28:59 +02:00
Paolo Tranquilli
f8c9d96882
Bazel: remove non-working fake tree-sitter-extractor workaround
...
The `.cargo/config.toml` override based workaround wasn't really
working, as while `cargo build|check` was reading that, `cargo metadata`
wasn't, ending up in a completely broken IDE experience.
For the moment, we just use a unified workspace `Cargo.toml` for all
extractors using the shared tree-sitter code, which has the downside of
making bazel pull in dependencies for all of them, and not being able to
do sparse checkouts for them. We should investigate and rivist this in
the future.
2024-09-11 08:17:11 +02:00
Arthur Baars
bffdf2b179
Replace println with log statements
2024-09-10 16:59:32 +02:00
Arthur Baars
f37b4aebc2
Only extract function bodies for local crates,
...
unless the -Oextract_dependencies=true flag is supplied
2024-09-10 16:49:13 +02:00
Arthur Baars
43e54fb0ae
Use custom target folder
2024-09-10 16:49:12 +02:00
Arthur Baars
1e830dad1a
Add ra_ap_paths dependency
2024-09-10 15:14:36 +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
Arthur Baars
2ae725784c
Don't use _ to ignore things so rustc will show warnings for all the gaps in the implementation
2024-09-10 12:26:56 +02:00
Arthur Baars
b2451c6667
Improve schema
2024-09-10 12:26:54 +02:00
Arthur Baars
46bfefc99a
Address comments
2024-09-10 12:26:53 +02:00
Paolo Tranquilli
437b671035
Merge branch 'rust-experiment' into aibaars/rust-experiment
...
Also fixed conflicts and applied linting (can be done via
`rust/lint.py` or `pre-commit` configuration).
2024-09-10 10:24:49 +02:00
Paolo Tranquilli
37afad2f70
Merge pull request #17410 from github/redsun82/rust-ci
...
Rust: set up `codeql` CI
2024-09-10 10:04:24 +02:00
Arthur Baars
61592a3256
Rust: fix locations
...
In QL locations are 1-based inclusive ranges. The locations is rust are 0-based
and the end position is exclusive.
To patch things up, subtract 1 from the end offset and add 1 to all line and column numbers.
2024-09-09 14:56:37 +02:00
Paolo Tranquilli
6f36ea9188
Merge branch 'main' into rust-experiment
...
Conflicts:
shared/tree-sitter-extractor/src/trap.rs
2024-09-09 14:15:34 +02:00
Arthur Baars
86215b4f02
Rename IfLet to IfStmt
2024-09-09 13:33:17 +02:00
Arthur Baars
6acc107021
Prevent a panic on generated labels
2024-09-09 13:25:46 +02:00