aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* reduce code duplicationAleksey Kladov2018-11-052-21/+19
|
* Merge #192bors[bot]2018-11-054-35/+129
|\ | | | | | | | | | | | | | | 192: grammar: for predicates in where r=matklad a=matklad closes #191 Co-authored-by: Aleksey Kladov <[email protected]>
| * grammar: for predicates in whereAleksey Kladov2018-11-054-35/+129
|/ | | | closes #191
* Merge #184bors[bot]2018-11-046-2/+397
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 184: Basic validation for character literals r=aochagavia a=aochagavia As part of #27 I would like to add a validator for characters that detects missing quotes and too long characters. I set up a dummy implementation to get my feet wet, which generates errors whenever it finds a character. Right now I have the following questions: 1. The `SyntaxError` type seems too basic to me. I think it would make sense to have a `SyntaxErrorKind` instead of a `msg` field (we can implement `Display` for it so you can generate the string if desired). It should also have a `TextRange` instead of a `TextUnit`, so you can support errors that are longer than one character. Do you agree? 1. I am manually checking whether the literal is a character (see the `is_char` method). Ideally, I would like to have a `LiteralKind` enum with variants like `Int`, `Float`, `Char`, `String`, etc. but it seems cumbersome to write all that by hand. Is there a way to specify this in `grammar.ron` so that the code is generated (the same way the `Expr` enum is generated)? By the way, there seems to be no error reporting of panics inside the language server. When I was developing this PR I accidentally introduced a panic, which resulted in no syntax errors being shown. I knew something was wrong, because normally the vscode highlights syntax errors, but I didn't know it was caused by a panic. Co-authored-by: Adolfo OchagavĂ­a <[email protected]>
| * Add character literal parsing and validationAdolfo OchagavĂ­a2018-11-046-2/+397
|/
* Merge #187bors[bot]2018-11-047-34/+23
|\ | | | | | | | | | | | | | | 187: Use Default everywhere r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Use Default everywhereAleksey Kladov2018-11-047-34/+23
|/
* Don't order import alphabeticalAleksey Kladov2018-11-013-5/+7
| | | | | alphabetical ordering is no more consistent, and much less useful then the ordering which arises naturally when you add import.
* Dead codeAleksey Kladov2018-11-011-41/+0
|
* Merge #183bors[bot]2018-11-014-45/+55
|\ | | | | | | | | | | | | | | 183: update salsa r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * update salsaAleksey Kladov2018-11-014-45/+55
|/
* Some docsAleksey Kladov2018-11-011-0/+12
|
* Merge #182bors[bot]2018-11-015-38/+114
|\ | | | | | | | | | | | | | | 182: Module source r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Add inline sourceAleksey Kladov2018-11-015-46/+93
| |
| * Introduce ModuleSourceAleksey Kladov2018-11-013-11/+40
|/
* Use From to get an owned ASTAleksey Kladov2018-11-013-402/+701
|
* Merge #179bors[bot]2018-11-015-6/+3
|\ | | | | | | | | | | | | | | 179: Remove DOC_COMMENT r=matklad a=kjeremy Closes #166 Co-authored-by: Jeremy A. Kolb <[email protected]>
| * Remove DOC_COMMENTJeremy A. Kolb2018-10-315-6/+3
| | | | | | | | Closes #166
* | remove SyntaxPtrDatabaseAleksey Kladov2018-11-014-19/+12
|/
* Fix testAleksey Kladov2018-10-311-0/+1
|
* Speedup fmtAleksey Kladov2018-10-312-15/+23
|
* RemoveDeadCodeAleksey Kladov2018-10-311-17/+0
|
* Reformat allAleksey Kladov2018-10-3135-366/+422
|
* Various changesMuhammad Mominul Huque2018-10-313-28/+40
| | | | | | | Pin to a specific toolchain version Format checking functionality Add a test to check the code formatting. Remove macro_use attribute
* initial implementationMuhammad Mominul Huque2018-10-313-11/+18
|
* Simplify find_all_refs by always resolving a ast::BindPatJeremy A. Kolb2018-10-311-32/+16
|
* Add DeclarationDescriptor and ReferenceDescriptorJeremy A. Kolb2018-10-313-4/+77
| | | | | Fixes #142 Fixes #146
* Merge #167bors[bot]2018-10-316-5/+235
|\ | | | | | | | | | | | | | | | | | | | | | | 167: Attempt to extract useful comments from function signatures r=matklad a=kjeremy I'm trying to extract useful function comments for signature info. This will also be useful for hover. This is a WIP (and actually works pretty well!) but I don't think it's the right approach long term so some guidance would be appreciated so that we could also get comments for say types and variable instances etc. Currently `test_fn_signature_with_simple_doc` fails due to a bug in `extend` but we probably shouldn't use this approach anyway. Maybe comments should be attached to nodes somehow? I'm also thinking that maybe the markdown bits should live in the language server. Thoughts? Co-authored-by: Jeremy A. Kolb <[email protected]>
| * Make extend private againJeremy A. Kolb2018-10-312-2/+2
| |
| * Useful comments from function signaturesJeremy A. Kolb2018-10-315-7/+217
| |
| * `ast::DocCommentsOwner` which represents a documentation comment ownerJeremy A. Kolb2018-10-313-0/+20
| |
* | Add MockAnalysis to make testing easierAleksey Kladov2018-10-317-76/+167
| |
* | Merge #178bors[bot]2018-10-311-0/+2
|\ \ | |/ |/| | | | | | | | | | | 178: Prevent panic by initializing LibrariesQuery r=matklad a=kjeremy Co-authored-by: Jeremy A. Kolb <[email protected]>
| * Prevent panic by initializing LibrariesQueryJeremy A. Kolb2018-10-311-0/+2
|/
* extract fixture parsingAleksey Kladov2018-10-314-22/+51
|
* Merge #177bors[bot]2018-10-313-3/+3
|\ | | | | | | | | | | | | | | 177: Librariese -> Libraries r=matklad a=kjeremy Co-authored-by: Jeremy A. Kolb <[email protected]>
| * Fix typoJeremy A. Kolb2018-10-313-3/+3
| |
* | Merge #176bors[bot]2018-10-3120-1066/+1066
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 176: Move completio to ra_analysis r=matklad a=matklad While we should handle completion for isolated file, it's better achieved by using empty Analysis, rather than working only with &File: we need memoization for type inference even inside a single file. Co-authored-by: Aleksey Kladov <[email protected]>
| * | remove old completionAleksey Kladov2018-10-315-1100/+1
| | |
| * | Move completion to ra_analysisAleksey Kladov2018-10-316-63/+711
| | | | | | | | | | | | | | | | | | While we should handle completion for isolated file, it's better achieved by using empty Analysis, rather than working only with &File: we need memoization for type inference even inside a single file.
| * | move resolve local nameAleksey Kladov2018-10-317-94/+31
| | |
| * | Move FnDescriptors to analyzerAleksey Kladov2018-10-3115-198/+712
| |/
* / Fix typosJeremy A. Kolb2018-10-311-2/+2
|/
* Introduce owned ast nodesAleksey Kladov2018-10-312-2/+1303
| | | | ast::FooNode is an owned 'static counterpart to ast::Foo<'a>
* Merge #171bors[bot]2018-10-308-22/+223
|\ | | | | | | | | | | | | | | 171: Query-based module scopes r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Add ModuleScope as a queryAleksey Kladov2018-10-308-22/+223
| | | | | | | | | | | | | | This is a first step towards queryifing completion and resolve. Some code currently duplicates ra_editor: the plan is to move all completion from ra_editor, but it'll take more than one commit.
* | :arrow_up: salsaAleksey Kladov2018-10-304-35/+40
|/
* Merge #168bors[bot]2018-10-301-1/+1
|\ | | | | | | | | | | | | | | 168: Fix param number r=matklad a=kjeremy Fixes the parameter number if we are not in a method Co-authored-by: Jeremy A. Kolb <[email protected]>
| * Fix param numberJeremy A. Kolb2018-10-301-1/+1
| |
* | Merge #169bors[bot]2018-10-308-15/+79
|\ \ | |/ |/| | | | | | | | | | | 169: Syntax ptr r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>