aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
Commit message (Collapse)AuthorAgeFilesLines
* Merge #1081bors[bot]2019-04-012-6/+53
|\ | | | | | | | | | | | | | | | | | | 1081: Async closure syntax r=matklad a=robojumper Fixes #1080. Also fixes an error introduced by #1072 where something like `async move "foo"` in expression position would trigger the assertion in `block_expr`. Co-authored-by: robojumper <[email protected]>
| * Async closure syntaxrobojumper2019-03-312-6/+53
| |
* | switch to new rowanAleksey Kladov2019-04-0115-800/+599
|/
* Add WherePred to allow predicate access in WhereClauseVille Penttinen2019-03-314-7/+131
| | | | | This also unifies parsing of WHERE_PRED bounds, now Lifetime bounds will also be parsed using TYPE_BOUND_LIST
* Merge #1072bors[bot]2019-03-312-0/+40
|\ | | | | | | | | | | | | | | 1072: recognize async move blocks r=matklad a=memoryruins closes #1053 Co-authored-by: memoryruins <[email protected]>
| * add test for async blocksmemoryruins2019-03-282-0/+40
| |
* | Add trait ast::TypeBoundsOwnerVille Penttinen2019-03-313-5/+21
| |
* | Update testsVille Penttinen2019-03-313-67/+115
| |
* | Update testsVille Penttinen2019-03-3025-418/+634
| |
* | Add new TYPE_BOUND_LIST and TYPE_BOUND syntax kindsVille Penttinen2019-03-302-0/+81
| | | | | | | | | | | | These are now used when parsing type bounds. In addition parsing paths inside a bound now does not recursively parse paths, rather they are treated as separate bounds, separated by +.
* | Fix parsing <= in type_argsVille Penttinen2019-03-302-6/+27
|/
* Add tests to ra_syntax for extern_crate_selfmemoryruins2019-03-282-1/+17
|
* Basics for trait method resolutionFlorian Diebold2019-03-252-2/+9
|
* Merge #1034bors[bot]2019-03-251-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1034: HIR diagnostics API r=matklad a=matklad This PR introduces diagnostics API for HIR, so we can now start issuing errors and warnings! Here are requirements that this solution aims to fulfill: * structured diagnostics: rather than immediately rendering error to string, we provide a well-typed blob of data with error-description. These data is used by IDE to provide fixes * open set diagnostics: there's no single enum with all possible diagnostics, which hopefully should result in better modularity The `Diagnostic` trait describes "a diagnostic", which can be downcast to a specific diagnostic kind. Diagnostics are expressed in terms of macro-expanded syntax tree: they store pointers to syntax nodes. Diagnostics are self-contained: you don't need any context, besides `db`, to fully understand the meaning of a diagnostic. Because diagnostics are tied to the source, we can't store them in salsa. So subsystems like type-checking produce subsystem-local diagnostic (which is a closed `enum`), which is expressed in therms of subsystem IR. A separate step converts these proto-diagnostics into `Diagnostic`, by merging them with source-maps. Note that this PR stresses type-system quite a bit: we now type-check every function in open files to compute errors! Discussion on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Diagnostics.20API Co-authored-by: Aleksey Kladov <[email protected]>
| * allow dyn diagnosticsAleksey Kladov2019-03-251-0/+6
| |
* | simplifyAleksey Kladov2019-03-251-37/+34
|/
* Merge #1036bors[bot]2019-03-251-33/+45
|\ | | | | | | | | | | | | | | | | | | | | | | | | 1036: Assist to flip equality (==) and negated equality (!=) operands. r=matklad a=marcogroppo This PR adds an assist to flip the equality operands. I hope this is the right way to do this (I'm a newbie...) Fixes #1023. Co-authored-by: Marco Groppo <[email protected]>
| * Target only the actual operator.Marco Groppo2019-03-241-33/+45
| | | | | | | | | | Renamed `BinExpr::op()` and `PrefixExpr::op()` to `op_kind`. Now `op()` returns the `SyntaxNode`.
* | Support references in higher-ranked trait boundsVille Penttinen2019-03-242-1/+127
|/ | | | Fixes #1020
* replace todo with fixmeAleksey Kladov2019-03-232-2/+2
|
* Fix reparsing failure when removing newlinepcpthm2019-03-212-0/+14
|
* Fix reparsing bug on "{}{}"pcpthm2019-03-212-1/+5
|
* Completely ignore errors for reparse fuzzpcpthm2019-03-211-1/+0
|
* Use template text to improve reparse fuzzingpcpthm2019-03-211-1/+5
|
* Fix lexer not producing right token on "_"pcpthm2019-03-212-0/+1
|
* Fix reparsing bug when lex result is differentpcpthm2019-03-213-2/+17
|
* Improve reparse fuzz testpcpthm2019-03-211-1/+13
|
* Fix an arithmetic overflow in reparserpcpthm2019-03-213-5/+11
|
* Add fuzz test for reparsingpcpthm2019-03-214-1/+64
|
* Refactor parser fuzz testingpcpthm2019-03-215-16/+23
|
* Error about attributes onpcpthm2019-03-192-0/+59
| | | | unallowed types of expression statement
* Allow attributes on top level expressionpcpthm2019-03-194-0/+152
| | | | | | A top level expression is either - a expression statement or - the last expression in a block
* Merge #991bors[bot]2019-03-188-10/+88
|\ | | | | | | | | | | | | | | | | | | | | | | 991: Use Marker argument for item parsers r=matklad a=pcpthm Before doing this for expressions, I found that the pattern (Marker argument) should be applied to the item parsers because visiblity and modifiers are parsed in a separate function. Fixed some parser bugs: - Fix pub_expr: `pub 42;` was allowed. - Fix incorrect parsing of crate::path: incorrectly parsed as `crate` as a visibility. Co-authored-by: pcpthm <[email protected]>
| * Use Marker argument for item parserspcpthm2019-03-188-10/+88
| | | | | | | | | | - Fix pub_expr - Fix incorrect parsing of crate::path
* | Merge #983bors[bot]2019-03-172-0/+217
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 983: support remainder assignment operator r=matklad a=JeanMertz `%=` was returning errors for me, turns out it wasn't added as a valid assignment operation. I'm not sure what the best location would be to add a test for this. Please let me know and I'll add one. Co-authored-by: Jean Mertz <[email protected]>
| * | support remainder assignment operatorJean Mertz2019-03-172-0/+217
| | |
* | | Fix parse tree of attribute on match armpcpthm2019-03-173-118/+118
| |/ |/|
* | Allow attribute on struct literal fieldpcpthm2019-03-172-0/+48
| |
* | add name resolution from the old implAleksey Kladov2019-03-173-7/+5
|/ | | | unlike the old impl, this also handles macro imports across crates
* Add test for minus in inner patternMichael Chesser2019-03-142-0/+347
|
* Add test for async blockCaio2019-03-102-0/+32
|
* Add async keywordCaio2019-03-095-1/+21
|
* Add support for parsing multiple if and while-let patternsVille Penttinen2019-03-042-1/+164
|
* allow `mut ident` patterns in trait methodsAleksey Kladov2019-03-042-11/+26
| | | | closes #928
* allow aliases in underscoresAleksey Kladov2019-03-042-1/+17
| | | | | | | | this helps with use foo::Trait as _; syntax
* Merge #926bors[bot]2019-03-042-0/+50
|\ | | | | | | | | | | | | | | 926: allow vararg functions r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * allow vararg functionsAleksey Kladov2019-03-042-0/+50
| |
* | improve error recoveryAleksey Kladov2019-03-043-42/+70
|/ | | | parse the contents of error block as an expression
* Remove `TypeRef` from item opts which implement TypeAscriptionOwnerVille Penttinen2019-02-272-33/+14
|
* Add new trait TypeAscriptionOwnerVille Penttinen2019-02-263-9/+36
| | | | | 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.