about summary refs log tree commit diff
path: root/crates/parser/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2022-01-02more intuitive orderAleksey Kladov-42/+42
2022-01-02check top level entry point invariantsAleksey Kladov-5/+23
2022-01-02add top-level tests for expressionsAleksey Kladov-1/+1
2022-01-02add top level tests for typesAleksey Kladov-1/+3
2022-01-02enforce parsing invariant for patternsAleksey Kladov-1/+1
2021-12-28dead codeAleksey Kladov-41/+0
2021-12-28remove Item::parseAleksey Kladov-2/+0
2021-12-28internal: start isolating ssr-related parsing APIs to SSRAleksey Kladov-2/+0
2021-12-28dead codeAleksey Kladov-2/+0
2021-12-28add TopEntryPointAleksey Kladov-9/+52
2021-12-28simplifyAleksey Kladov-2/+6
2021-12-28move pathAleksey Kladov-2/+4
2021-12-28move exprAleksey Kladov-0/+2
2021-12-28move tyAleksey Kladov-1/+3
2021-12-28move pat to prefix entry pointsAleksey Kladov-2/+5
2021-12-28move stmt to entry pointsAleksey Kladov-6/+2
2021-12-28internal: move block to prefix entry pointAleksey Kladov-0/+2
2021-12-28internal: move visibility to a prefix entry pointAleksey Kladov-3/+4
2021-12-28internal: add prefix entry pointsAleksey Kladov-0/+24
2021-12-26internal: move ws attachment logic to the parser crateAleksey Kladov-0/+2
This has to re-introduce the `sink` pattern, because doing this purely with iterators is awkward :( Maaaybe the event vector was a false start? But, anyway, I like the current factoring more -- it sort-of obvious that we do want to keep ws-attachment business in the parser, and that we also don't want that to depend on the particular tree structure. I think `shortcuts` module achieves that.
2021-12-25internal: renameAleksey Kladov-9/+17
2021-12-25internal: replace TreeSink with a data structureAleksey Kladov-25/+13
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-12-18soa all the thingsAleksey Kladov-2/+2
2021-12-18move lexing to the parser crateAleksey Kladov-1/+5
2021-12-12port mbe to soa tokensAleksey Kladov-2/+5
2021-12-12parser tests workAleksey Kladov-30/+1
2021-12-12Switch parser to use tokensAleksey Kladov-10/+9
2021-12-12start SOA parser interfaceAleksey Kladov-0/+1
2021-09-06minor: modernizeAleksey Kladov-3/+1
2021-09-06internal: make name consistent with usageAleksey Kladov-33/+33
2021-09-05internal: remove accidental code re-useAleksey Kladov-4/+0
FragmentKind played two roles: * entry point to the parser * syntactic category of a macro call These are different use-cases, and warrant different types. For example, macro can't expand to visibility, but we have such fragment today. This PR introduces `ExpandsTo` enum to separate this two use-cases. I suspect we might further split `FragmentKind` into `$x:specifier` enum specific to MBE, and a general parser entry point, but that's for another PR!
2021-08-03tree-wide: fix rustdoc warnings, add some linksJade-7/+10
2021-01-03parser,syntax: Add separate parser for stmt with optional semicolonMarijn Suijten-0/+2
Adjusting `grammar::fragments::stmt` to Optional or Yes will break original functionality and tests.
2020-12-20Use pattern_single instead of pattern in mbe patEdwin Cheng-1/+1
2020-12-18Implement `RawAttr::filter`Jonas Schievink-0/+3
2020-08-12Rename ra_syntax -> syntaxAleksey Kladov-1/+1
2020-08-12Rename ra_parser -> parserAleksey Kladov-0/+149