about summary refs log tree commit diff
path: root/crates/syntax/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2022-05-24fix: Insert whitespace into trait-impl completions when coming from macrosLukas Wirth-1/+0
2022-02-24fix(11422): have two different funuctions - one for iterating breaks, one ↵Moritz Vetter-3/+4
for iteraating breaks and continues
2022-01-31Make more precise range macro upmappingLukas Wirth-2/+2
2021-12-28introduce hacks moduleAleksey Kladov-20/+1
2021-12-28dead codeAleksey Kladov-7/+0
2021-12-28remove fragments from syntaxAleksey Kladov-7/+0
2021-12-28drop dead codeAleksey Kladov-7/+0
2021-12-28remove Item::parseAleksey Kladov-7/+0
2021-12-28internal: start isolating ssr-related parsing APIs to SSRAleksey Kladov-7/+0
2021-12-18internal: move all the lexing to the parser crateAleksey Kladov-1/+0
2021-12-18minor: dead codeAleksey Kladov-1/+1
2021-12-14`match_ast!` takes a pattern to allow underscore usageLukas Wirth-1/+1
2021-10-09internal: make sure macro test expand to valid syntaxAleksey Kladov-4/+3
2021-09-27Rename `*Owner` traits to `Has*`Lukas Wirth-1/+1
2021-09-26internal: more reasonable grammar for blocksAleksey Kladov-3/+4
Consider these expples { 92 } async { 92 } 'a: { 92 } #[a] { 92 } Previously the tree for them were BLOCK_EXPR { ... } EFFECT_EXPR async BLOCK_EXPR { ... } EFFECT_EXPR 'a: BLOCK_EXPR { ... } BLOCK_EXPR #[a] { ... } As you see, it gets progressively worse :) The last two items are especially odd. The last one even violates the balanced curleys invariant we have (#10357) The new approach is to say that the stuff in `{}` is stmt_list, and the block is stmt_list + optional modifiers BLOCK_EXPR STMT_LIST { ... } BLOCK_EXPR async STMT_LIST { ... } BLOCK_EXPR 'a: STMT_LIST { ... } BLOCK_EXPR #[a] STMT_LIST { ... }
2021-09-26internal: fix and force-disable block validation ;-(Aleksey Kladov-4/+0
Originally we tried to maintain the invariant that `{}` always match. That is, that in the parse tree the pair of corresponding `{}` is always first and last tokens of some nodes. We had the code to validate that, but apparently it's been broken for **years** since we introduced tokens/nodes split. Fixing it now makes some tests fail. It's unclear if we want to keep this invariant: there's a strong motivation for breaking it in the following case: ``` use std::{ // unclosed paren fn main() { } } // don't actually want to pair up this with the one from `use` ``` So let's fix the code, but disable it for the time being
2021-09-19Only strip derive attributes when preparing macro inputLukas Wirth-2/+2
2021-09-06internal: make name consistent with usageAleksey Kladov-7/+13
2021-08-14internal: remove dead codeAleksey Kladov-1/+0
2021-03-26Add TokenTextAleksey Kladov-0/+2
2021-03-16Upgrade rowanAleksey Kladov-0/+1
Notably, new rowan comes with support for mutable syntax trees.
2021-03-08Better strip turbofishesKirill Bulatov-0/+1
2021-01-20:arrow_up: rowanAleksey Kladov-2/+2
It now stores text inline with tokens
2021-01-05Rename expr -> tail_exprAleksey Kladov-1/+1
2021-01-03parser,syntax: Add separate parser for stmt with optional semicolonMarijn Suijten-1/+1
Adjusting `grammar::fragments::stmt` to Optional or Yes will break original functionality and tests.
2021-01-03syntax,ssr: Implement statement parsingMarijn Suijten-0/+7
2020-12-18Implement `RawAttr::filter`Jonas Schievink-0/+7
2020-11-02Deny unreachable-pubAleksey Kladov-4/+7
It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034.
2020-10-18Extract call_info and completion into separate cratesIgor Aleksanov-0/+1
2020-08-12Rename ra_syntax -> syntaxAleksey Kladov-0/+388