about summary refs log tree commit diff
path: root/crates/ra_syntax/src/ast
AgeCommit message (Collapse)AuthorLines
2019-02-27Remove `TypeRef` from item opts which implement TypeAscriptionOwnerVille Penttinen-27/+3
2019-02-26Add new trait TypeAscriptionOwnerVille Penttinen-0/+6
This trait should be implemented for nodes which have an ascribed type, e.g. thing : Type. Such as let, const, static, param, named struct fields.
2019-02-25rename type to type_alias in the AST as wellAleksey Kladov-47/+47
2019-02-24support upcastig in AST enumAleksey Kladov-0/+407
2019-02-17Enable parsing attributes for generic lifetimes and type parametersVille Penttinen-0/+2
2019-02-17Enable parsing of attributes inside a match blockVille Penttinen-0/+2
We allow invalid inner attributes to be parsed, e.g. inner attributes that are not directly after the opening brace of the match block. Instead we run validation on `MatchArmList` to allow better reporting of errors.
2019-02-16Handle generic args for method callsFlorian Diebold-0/+4
2019-02-16Add generic params to impl blocksFlorian Diebold-0/+1
2019-02-13Import the preludeFlorian Diebold-0/+1
2019-02-12rename yellow -> syntax_nodeAleksey Kladov-2/+2
why yellow in the first place? Its red + green.
2019-02-11make macro a NameOwnerAleksey Kladov-0/+1
2019-02-09Fix handling of literal patternsFlorian Diebold-1/+36
Wrap them in a LiteralPat node so they can be distinguished from literal expressions.
2019-02-05Fill deprecation for LSPkjeremy-0/+1
2019-02-04Add AST for extern crateFlorian Diebold-1/+9
Also change it to parse the crate name as a NAME_REF, not a NAME.
2019-02-02Pass aliases to ImportDataFlorian Diebold-0/+33
2019-01-31Merge #692bors[bot]-0/+1
692: [WIP] Correctly parse attributes r=matklad a=DJMcNab Reference - https://doc.rust-lang.org/reference/attributes.html This fixes/investigates inner attributes for: - [x] `impl` blocks - [x] `extern` blocks - [x] `fn`s (fixes #689) - [x] `mod`s (already supported) - [x] 'block expressions' (the long text just describes all 'blocks' used as statements) This also investigates/fixes outer attributes for: - [ ] 'most statements' (see also: #685, https://doc.rust-lang.org/reference/expressions.html#expression-attributes) - [x] Enum variants, Struct and Union fields (Fixed in #507) - [ ] 'Match expression arms' (@matklad can you provide a test case which explains what this means?) - [ ] 'Generic lifetime or type parameters' - [ ] 'Elements of array expressions, tuple expressions, call expressions, tuple-style struct and enum variant expressions' - [ ] 'The tail expression of block expressions' Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2019-01-28Infer type of match guardMarcus Klaas de Vries-1/+5
2019-01-28Parse and validate attributes in blocksDJMcNab-0/+1
2019-01-27fix verification on CIAleksey Kladov-44/+0
remove `--verify` flag from the binaries: we have tests for this!
2019-01-27fix AST for if expressionsAleksey Kladov-0/+44
then is not always a block...
2019-01-26rename POS_FIELD -> POS_FIELD_DEFAleksey Kladov-21/+21
to match NAMED_FIELD_DEF
2019-01-25Add docs to struct fieldsJeremy A. Kolb-0/+1
2019-01-25Merge #630bors[bot]-3/+15
630: Fill in DocumentSymbol::detail r=matklad a=hban Closes: #516 I just pulled type text from the syntax node and "formatted" is bit. VS Code can't really handle multi-line symbol detail (it's will crop it when rendering), so that formatting will just collapse all white-space to singe space. It isn't pretty, but maybe there's a better way. Issue also mentions "need to be done for `NavigationTarget` to `SymbolInformation`", but `SymbolInformation` doesn't have detail field on it? Co-authored-by: Hrvoje Ban <hban@users.noreply.github.com>
2019-01-24Merge #633bors[bot]-0/+504
633: use ToOwned trait instead of inherent method r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-25use ToOwned trait instead of inherent methodAleksey Kladov-0/+504
2019-01-25Migrate trait & type to new idsAleksey Kladov-0/+1
2019-01-24Fill in DocumentSymbol::detailHrvoje Ban-3/+15
2019-01-23Make EnumVariant a DocCommentsOwnerJeremy A. Kolb-0/+1
2019-01-19Add AST/HIR for type args in path segmentsFlorian Diebold-0/+128
2019-01-19Change parsing of struct field patternsMarcus Klaas de Vries-1/+5
2019-01-19Move parsing of field pattern lists to the parser (where it belongs)Marcus Klaas de Vries-1/+34
2019-01-19Add initial (flawed) implementation of binding annotationsMarcus Klaas de Vries-1/+5
2019-01-19Create struct patterns up to the hir levelMarcus Klaas de Vries-4/+9
2019-01-19Add additional pattern variantsMarcus Klaas de Vries-2/+10
2019-01-16Update ARRAY_EXPR grammarHirokazu Hata-1/+5
2019-01-14Fix type inference for raw (byte) stringsMarcus Klaas de Vries-0/+56
2019-01-14Fixup testsMarcus Klaas de Vries-38/+94
2019-01-14Start moving literal interpretation to the AST (WIP)Marcus Klaas de Vries-4/+110
2019-01-13Update TUPLE_EXPR grammarHirokazu Hata-1/+5
2019-01-13support ref-patternsAleksey Kladov-1/+5
2019-01-11rename TreePtr -> TreeArcAleksey Kladov-116/+116
This is much clearer about the semantics
2019-01-08itroduce trait for ast tokensAleksey Kladov-0/+7
2019-01-08regenerateAleksey Kladov-3052/+1791
2019-01-08switch ra_syntax to new rowan APIAleksey Kladov-45/+48
2019-01-06Make FnScopes use hir::ExprFlorian Diebold-16/+9
This was a bit complicated. I've added a wrapper type for now that does the LocalSyntaxPtr <-> ExprId translation; we might want to get rid of that or give it a nicer interface.
2019-01-05Add HIR Expr machineryFlorian Diebold-1/+9
2019-01-04Type the self parameterFlorian Diebold-1/+46
2019-01-04Add HIR for impl blocksFlorian Diebold-2/+38
Since we need to be able to go from def to containing impl block, as well as the other direction, and to find all impls for a certain type, a design similar to the one for modules, where we collect all impls for the whole crate and keep them in an arena, seemed fitting. The ImplBlock type, which provides the public interface, then consists only of an Arc to the arena containing all impls, and the index into it.
2019-01-04Rename ImplItem to ImplBlockFlorian Diebold-18/+18
rustc uses the name ImplItem for items in impls, not the impl {} block itself, which could lead to confusion.
2019-01-03visibility ownerAleksey Kladov-0/+47