Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Merge #75 | bors[bot] | 2018-09-19 | 1 | -1/+1 | |
|\ | | | | | | | | | | | | | | | 75: libsyntax2 -> rust-analyzer r=matklad a=kjeremy Change a few `libsyntax2` to `rust-analyzer` Co-authored-by: Jeremy A. Kolb <[email protected]> | |||||
| * | libsyntax2 -> rust-analyzer | Jeremy A. Kolb | 2018-09-18 | 1 | -1/+1 | |
| | | ||||||
* | | prefer lifetimes in extend selection | Aleksey Kladov | 2018-09-19 | 1 | -1/+13 | |
| | | ||||||
* | | Add emacs function for extend shirnk selection | Aleksey Kladov | 2018-09-18 | 3 | -3/+37 | |
|/ | ||||||
* | eprintln | Aleksey Kladov | 2018-09-16 | 1 | -7/+37 | |
| | ||||||
* | rename all things | Aleksey Kladov | 2018-09-16 | 468 | -107/+107 | |
| | ||||||
* | fix derecated call | Aleksey Kladov | 2018-09-16 | 1 | -2/+2 | |
| | ||||||
* | fix installation for windows | Aleksey Kladov | 2018-09-16 | 1 | -3/+11 | |
| | ||||||
* | get rid of commandspeck | Aleksey Kladov | 2018-09-16 | 2 | -22/+21 | |
| | ||||||
* | Merge #67 | bors[bot] | 2018-09-15 | 18 | -453/+1285 | |
|\ | | | | | | | | | | | | | | | | | | | | | | | 67: Salsa r=matklad a=matklad The aim of this PR is to transition from rather ad-hock FileData and ModuleMap caching strategy to something resembling a general-purpose red-green engine. Ideally, we shouldn't recompute ModuleMap at all, unless the set of mod decls or files changes. Co-authored-by: Aleksey Kladov <[email protected]> | |||||
| * | everysalsa | Aleksey Kladov | 2018-09-15 | 4 | -23/+40 | |
| | | ||||||
| * | kill old module_map | Aleksey Kladov | 2018-09-15 | 9 | -540/+239 | |
| | | ||||||
| * | move readonly source to module tree descr | Aleksey Kladov | 2018-09-15 | 2 | -17/+25 | |
| | | ||||||
| * | ModuleTreeDescriptor | Aleksey Kladov | 2018-09-15 | 8 | -138/+306 | |
| | | ||||||
| * | yet another db api | Aleksey Kladov | 2018-09-15 | 5 | -258/+274 | |
| | | ||||||
| * | minor | Aleksey Kladov | 2018-09-15 | 2 | -2/+3 | |
| | | ||||||
| * | renames | Aleksey Kladov | 2018-09-15 | 3 | -47/+49 | |
| | | ||||||
| * | use salsa for new module map | Aleksey Kladov | 2018-09-15 | 8 | -395/+318 | |
| | | ||||||
| * | eager invalidation | Aleksey Kladov | 2018-09-15 | 2 | -12/+76 | |
| | | ||||||
| * | be generic over data | Aleksey Kladov | 2018-09-15 | 2 | -55/+61 | |
| | | ||||||
| * | generic salsa algo | Aleksey Kladov | 2018-09-15 | 3 | -0/+399 | |
| | | ||||||
| * | store params in the graph | Aleksey Kladov | 2018-09-15 | 1 | -5/+7 | |
| | | ||||||
| * | any-cache | Aleksey Kladov | 2018-09-15 | 2 | -21/+18 | |
| | | ||||||
| * | fix dep tracking | Aleksey Kladov | 2018-09-15 | 2 | -31/+18 | |
| | | ||||||
| * | add deps tracking | Aleksey Kladov | 2018-09-15 | 3 | -47/+148 | |
| | | ||||||
| * | Add simplisitc global modification caching | Aleksey Kladov | 2018-09-15 | 3 | -31/+111 | |
| | | ||||||
| * | initial query tracing | Aleksey Kladov | 2018-09-15 | 2 | -13/+55 | |
| | | ||||||
| * | start query-based modules | Aleksey Kladov | 2018-09-15 | 7 | -41/+361 | |
| | | ||||||
* | | Merge #69 | bors[bot] | 2018-09-15 | 4 | -198/+360 | |
|\ \ | |/ |/| | | | | | | | | | | | 69: Incremental reparsing for single tokens r=matklad a=darksv Implement incremental reparsing for `WHITESPACE`, `COMMENT`, `DOC_COMMENT`, `IDENT`, `STRING` and `RAW_STRING`. This allows to avoid reparsing whole blocks when a change was made only within these tokens. Co-authored-by: darksv <[email protected]> | |||||
| * | independent tests for incremental reparsing of blocks and leaves | darksv | 2018-09-15 | 1 | -48/+68 | |
| | | ||||||
| * | move reparsing tests | darksv | 2018-09-15 | 3 | -129/+140 | |
| | | ||||||
| * | commit missing file | darksv | 2018-09-15 | 1 | -1/+1 | |
| | | ||||||
| * | create separated mod for reparsing functionality | darksv | 2018-09-15 | 3 | -170/+200 | |
| | | ||||||
| * | correctly handle IDENTs when changed to contextual keywords | darksv | 2018-09-14 | 1 | -1/+15 | |
| | | ||||||
| * | create leaf directly without calling the parser | darksv | 2018-09-14 | 1 | -23/+2 | |
| | | ||||||
| * | Incremental reparsing for single tokens (WHITESPACE, COMMENT, DOC_COMMENT, ↵ | darksv | 2018-09-13 | 2 | -14/+122 | |
| | | | | | | | | IDENT, STRING, RAW_STRING) | |||||
* | | adjust trailing newline | darksv | 2018-09-14 | 2 | -2/+4 | |
| | | ||||||
* | | add missing files with inline tests | darksv | 2018-09-14 | 2 | -0/+13 | |
| | | ||||||
* | | Support for unions | darksv | 2018-09-14 | 4 | -7/+161 | |
|/ | ||||||
* | don't get stuck in slice patterns | Aleksey Kladov | 2018-09-12 | 2 | -21/+122 | |
| | ||||||
* | correctly setup path-map for fs-changes | Aleksey Kladov | 2018-09-12 | 1 | -23/+24 | |
| | ||||||
* | Merge #68 | bors[bot] | 2018-09-11 | 9 | -28/+98 | |
|\ | | | | | | | | | | | | | | | 68: Implement incremental reparsing for remaining braced blocks r=matklad a=darksv Fixes #66 Co-authored-by: darksv <[email protected]> | |||||
| * | Do not reparse token tree when it is not delimited by braces | darksv | 2018-09-10 | 2 | -1/+6 | |
| | | ||||||
| * | Implement reparsing for remaining blocks | darksv | 2018-09-10 | 9 | -28/+93 | |
| | | ||||||
* | | store file rsovler | Aleksey Kladov | 2018-09-10 | 7 | -116/+146 | |
|/ | ||||||
* | Merge #65 | bors[bot] | 2018-09-08 | 1 | -1/+1 | |
|\ | | | | | | | | | | | | | | | 65: simplify r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]> | |||||
| * | simplify | Aleksey Kladov | 2018-09-08 | 1 | -1/+1 | |
| | | ||||||
* | | Fix yet another parser infinite loop | Aleksey Kladov | 2018-09-08 | 2 | -8/+10 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is an example of fixing a common parser error: infinite loop due to error recovery. This error typically happens when we parse a list of items and fail to parse a specific item at the current position. One choices is to skip a token and try to parse a list item at the next position. This is a good, but not universal, default. When parsing a list of arguments in a function call, you, for example, don't want to skip over `fn`, because it's most likely that it is a function declaration, and not a mistyped arg: ``` fn foo() { quux(1, 2 fn bar() { } ``` Another choice is to bail out of the loop immediately, but it isn't perfect either: sometimes skipping over garbage helps: ``` quux(1, foo:, 92) // should skip over `:`, b/c that's part of `foo::bar` ``` In general, parser tries to balance these two cases, though we don't have a definitive strategy yet. However, if the parser accidentally neither skips over a token, nor breaks out of the loop, then it becomes stuck in the loop infinitely (there's an internal counter to self-check this situation and panic though), and that's exactly what is demonstrated by the test. To fix such situation, first of all, add the test case to tests/data/parser/{err,fuzz-failures}. Then, run ``` RUST_BACKTRACE=short cargo test --package libsyntax2 ```` to verify that parser indeed panics, and to get an idea what grammar production is the culprit (look for `_list` functions!). In this case, I see ``` 10: libsyntax2::grammar::expressions::atom::match_arm_list at crates/libsyntax2/src/grammar/expressions/atom.rs:309 ``` and that's look like it might be a culprit. I verify it by adding `eprintln!("loopy {:?}", p.current());` and indeed I see that this is printed repeatedly. Diagnosing this a bit shows that the problem is that `pattern::pattern` function does not consume anything if the next token is `let`. That is a good default to make cases like ``` let let foo = 92; ``` where the user hasn't typed the pattern yet, to parse in a reasonable they correctly. For match arms, pretty much the single thing we expect is a pattern, so, for a fix, I introduce a special variant of pattern that does not do recovery. | |||||
* | | Add fuzz failures dir | Aleksey Kladov | 2018-09-08 | 2 | -4/+213 | |
|/ | ||||||
* | move fuzz-invariants to the library | Aleksey Kladov | 2018-09-08 | 3 | -41/+44 | |
| |