about summary refs log tree commit diff
path: root/crates/syntax/src/syntax_node.rs
AgeCommit message (Collapse)AuthorLines
2022-07-08Update remaining GitHub URLsJonas Schievink-1/+1
2021-12-25internal: replace TreeSink with a data structureAleksey Kladov-2/+2
The general theme of this is to make parser a better independent library. The specific thing we do here is replacing callback based TreeSink with a data structure. That is, rather than calling user-provided tree construction methods, the parser now spits out a very bare-bones tree, effectively a log of a DFS traversal. This makes the parser usable without any *specifc* tree sink, and allows us to, eg, move tests into this crate. Now, it's also true that this is a distinction without a difference, as the old and the new interface are equivalent in expressiveness. Still, this new thing seems somewhat simpler. But yeah, I admit I don't have a suuper strong motivation here, just a hunch that this is better.
2021-10-10Add commentk-nasa-0/+1
2021-10-03Add semicolons for consistencyAramis Razzaghipour-4/+4
`clippy::semicolon_if_nothing_returned`
2021-09-26internal: fix and force-disable block validation ;-(Aleksey Kladov-1/+1
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-0/+1
2021-01-20:arrow_up: rowanAleksey Kladov-2/+2
It now stores text inline with tokens
2020-11-02Deny unreachable-pubAleksey Kladov-5/+1
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-08-12Rename ra_syntax -> syntaxAleksey Kladov-0/+77