]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoMerge #215
bors[bot] [Sat, 17 Nov 2018 12:50:29 +0000 (12:50 +0000)]
Merge #215

215: Add Travis Windows build r=matklad a=phansch

This adds the Windows build to Travis.

I had to use the `dos2unix` utility on the parser directory to fix some incorrect
line endings. I'm not sure where they are coming from but I guess git is
converting them automatically when cloning on Windows.

Closes #139

Co-authored-by: Philipp Hansch <dev@phansch.net>
5 years agoMerge #227
bors[bot] [Fri, 16 Nov 2018 11:22:40 +0000 (11:22 +0000)]
Merge #227

227: Correctly map between UTF-8 and UTF-16 positions r=aochagavia a=aochagavia

Fixes #202

Co-authored-by: Adolfo Ochagavía <github@adolfo.ochagavia.xyz>
Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
5 years agocargo format
Adolfo Ochagavía [Fri, 16 Nov 2018 11:16:20 +0000 (12:16 +0100)]
cargo format

5 years agoRename col to col_utf16
Adolfo Ochagavía [Fri, 16 Nov 2018 11:02:45 +0000 (12:02 +0100)]
Rename col to col_utf16

5 years agoSupport UTF-16 chars in LineIndex
Adolfo Ochagavía [Thu, 15 Nov 2018 16:34:05 +0000 (17:34 +0100)]
Support UTF-16 chars in LineIndex

5 years agoMerge #203
bors[bot] [Thu, 15 Nov 2018 11:57:03 +0000 (11:57 +0000)]
Merge #203

203: Add roadmap r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: Adolfo Ochagavía <github@adolfo.ochagavia.xyz>
5 years agoMerge #226
bors[bot] [Mon, 12 Nov 2018 15:59:47 +0000 (15:59 +0000)]
Merge #226

226: Validate byte literals and byte strings r=aochagavia a=aochagavia

Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
5 years agoSplit string lexing and run rustfmt
Adolfo Ochagavía [Sun, 11 Nov 2018 20:00:31 +0000 (21:00 +0100)]
Split string lexing and run rustfmt

5 years agoValidate byte string literals
Adolfo Ochagavía [Sun, 11 Nov 2018 19:41:43 +0000 (20:41 +0100)]
Validate byte string literals

5 years agoAdd validator for byte
Adolfo Ochagavía [Sun, 11 Nov 2018 19:27:00 +0000 (20:27 +0100)]
Add validator for byte

5 years agoFix typos
Adolfo Ochagavía [Sun, 11 Nov 2018 18:28:55 +0000 (19:28 +0100)]
Fix typos

5 years agoMerge #222
bors[bot] [Sat, 10 Nov 2018 14:36:45 +0000 (14:36 +0000)]
Merge #222

222: Validate string literals r=aochagavia a=aochagavia

Related: #6 (some validators are still missing), fixes #27

Co-authored-by: Adolfo Ochagavía <github@adolfo.ochagavia.xyz>
5 years agoValidate string literals
Adolfo Ochagavía [Thu, 8 Nov 2018 14:42:00 +0000 (15:42 +0100)]
Validate string literals

5 years agoMerge #221
bors[bot] [Fri, 9 Nov 2018 12:13:50 +0000 (12:13 +0000)]
Merge #221

221: Fix on enter r=matklad a=aochagavia

Fixes #219

Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
5 years agoFix on enter
Adolfo Ochagavía [Fri, 9 Nov 2018 12:10:53 +0000 (13:10 +0100)]
Fix on enter

5 years agoFix the test
Aleksey Kladov [Thu, 8 Nov 2018 15:54:19 +0000 (18:54 +0300)]
Fix the test

5 years agoworkspace-symbols function for Emacs
Aleksey Kladov [Thu, 8 Nov 2018 15:43:02 +0000 (18:43 +0300)]
workspace-symbols function for Emacs

5 years agoeglot worksapce symbol
Aleksey Kladov [Thu, 8 Nov 2018 14:40:04 +0000 (17:40 +0300)]
eglot worksapce symbol

5 years agoMerge #217
bors[bot] [Wed, 7 Nov 2018 18:39:33 +0000 (18:39 +0000)]
Merge #217

217: Complete paths in use trees r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoComplete paths in use trees
Aleksey Kladov [Wed, 7 Nov 2018 18:38:41 +0000 (21:38 +0300)]
Complete paths in use trees

5 years agoDo more work in classify
Aleksey Kladov [Wed, 7 Nov 2018 18:17:18 +0000 (21:17 +0300)]
Do more work in classify

5 years agoUse cached module scopes for completion
Aleksey Kladov [Wed, 7 Nov 2018 18:08:11 +0000 (21:08 +0300)]
Use cached module scopes for completion

5 years agosplit completion mod
Aleksey Kladov [Wed, 7 Nov 2018 17:34:16 +0000 (20:34 +0300)]
split completion mod

5 years agoreorganize completion
Aleksey Kladov [Wed, 7 Nov 2018 16:49:49 +0000 (19:49 +0300)]
reorganize completion

5 years agoRemove AppVeyor
Philipp Hansch [Wed, 7 Nov 2018 16:06:37 +0000 (17:06 +0100)]
Remove AppVeyor

5 years agoOnly build windows on master and allow failure
Philipp Hansch [Wed, 7 Nov 2018 15:59:43 +0000 (16:59 +0100)]
Only build windows on master and allow failure

The Windows build is much slower than Linux, so we only build it on master
and make the build status not depend on it finishing up.

5 years agorename module source
Aleksey Kladov [Wed, 7 Nov 2018 15:42:30 +0000 (18:42 +0300)]
rename module source

5 years agorename ROOT -> SOURCE_FILE
Aleksey Kladov [Wed, 7 Nov 2018 15:38:43 +0000 (18:38 +0300)]
rename ROOT -> SOURCE_FILE

5 years agoRename File -> SourceFileNode
Aleksey Kladov [Wed, 7 Nov 2018 15:32:33 +0000 (18:32 +0300)]
Rename File -> SourceFileNode

5 years agoCargo update
Jeremy A. Kolb [Wed, 7 Nov 2018 15:32:08 +0000 (10:32 -0500)]
Cargo update

5 years agoRustfmt to pass CI
Jeremy A. Kolb [Wed, 7 Nov 2018 14:13:16 +0000 (09:13 -0500)]
Rustfmt to pass CI

5 years agoRemove unused variable
Jeremy A. Kolb [Mon, 5 Nov 2018 22:09:45 +0000 (17:09 -0500)]
Remove unused variable

5 years agoShow documentation for hover requests
Jeremy A. Kolb [Mon, 5 Nov 2018 21:37:27 +0000 (16:37 -0500)]
Show documentation for hover requests

5 years agoAdd some more DocCommentsOwner
Jeremy A. Kolb [Fri, 2 Nov 2018 13:59:07 +0000 (09:59 -0400)]
Add some more DocCommentsOwner

5 years agoAdd Travis Windows build
Philipp Hansch [Tue, 6 Nov 2018 19:43:08 +0000 (20:43 +0100)]
Add Travis Windows build

5 years agoMerge #207
bors[bot] [Wed, 7 Nov 2018 11:09:40 +0000 (11:09 +0000)]
Merge #207

207: Finish implementing char validation r=aochagavia a=aochagavia

The only thing missing right now are good integration tests (and maybe more descriptive error messages)

Co-authored-by: Adolfo Ochagavía <github@adolfo.ochagavia.xyz>
5 years agoFix backslash escape
Adolfo Ochagavía [Wed, 7 Nov 2018 11:03:02 +0000 (12:03 +0100)]
Fix backslash escape

5 years agoUse ArrayString instead of hand rolled data structure
Adolfo Ochagavía [Wed, 7 Nov 2018 10:58:34 +0000 (11:58 +0100)]
Use ArrayString instead of hand rolled data structure

5 years agocargo format
Adolfo Ochagavía [Wed, 7 Nov 2018 10:41:42 +0000 (11:41 +0100)]
cargo format

5 years agoAdd lots of tests
Adolfo Ochagavía [Wed, 7 Nov 2018 10:35:33 +0000 (11:35 +0100)]
Add lots of tests

5 years agoStore hex digits in a stack-allocated buffer
Adolfo Ochagavía [Wed, 7 Nov 2018 09:40:58 +0000 (10:40 +0100)]
Store hex digits in a stack-allocated buffer

5 years agoMerge #213
bors[bot] [Tue, 6 Nov 2018 20:52:50 +0000 (20:52 +0000)]
Merge #213

213: remove the last changing file from cache r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoremove the last changing file from cache
Aleksey Kladov [Tue, 6 Nov 2018 20:52:11 +0000 (23:52 +0300)]
remove the last changing file from cache

5 years agoMerge #212
bors[bot] [Tue, 6 Nov 2018 20:35:06 +0000 (20:35 +0000)]
Merge #212

212: evitct more stuff from cache r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoevitct more stuff from cache
Aleksey Kladov [Tue, 6 Nov 2018 20:34:30 +0000 (23:34 +0300)]
evitct more stuff from cache

5 years agoMerge #211
bors[bot] [Tue, 6 Nov 2018 20:28:04 +0000 (20:28 +0000)]
Merge #211

211: ra_syntax::File is just RootNode r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agora_syntax::File is just RootNode
Aleksey Kladov [Tue, 6 Nov 2018 19:47:38 +0000 (22:47 +0300)]
ra_syntax::File is just RootNode

5 years agoMerge #210
bors[bot] [Tue, 6 Nov 2018 19:23:06 +0000 (19:23 +0000)]
Merge #210

210: cleanup cahces more aggressively r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agocleanup cahces more aggressively
Aleksey Kladov [Tue, 6 Nov 2018 19:22:22 +0000 (22:22 +0300)]
cleanup cahces more aggressively

5 years agoMerge #209
bors[bot] [Tue, 6 Nov 2018 19:08:00 +0000 (19:08 +0000)]
Merge #209

209: Owned nodes r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoAdd a pinch of comments
Aleksey Kladov [Tue, 6 Nov 2018 19:06:58 +0000 (22:06 +0300)]
Add a pinch of comments

5 years agoGeneralize Owned nodes
Aleksey Kladov [Tue, 6 Nov 2018 18:52:00 +0000 (21:52 +0300)]
Generalize Owned nodes

5 years agoMerge #208
bors[bot] [Tue, 6 Nov 2018 18:20:30 +0000 (18:20 +0000)]
Merge #208

208: grammar: fix where clause parsing r=matklad a=matklad

closes #205

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agogrammar: fix where clause parsing
Aleksey Kladov [Tue, 6 Nov 2018 18:19:32 +0000 (21:19 +0300)]
grammar: fix where clause parsing

closes #205

5 years agoupstream basic tree algorithms to rowan
Aleksey Kladov [Tue, 6 Nov 2018 17:56:32 +0000 (20:56 +0300)]
upstream basic tree algorithms to rowan

5 years agoFinish implementing char validation
Adolfo Ochagavía [Tue, 6 Nov 2018 16:05:06 +0000 (17:05 +0100)]
Finish implementing char validation

5 years agoClarifications and formatting
Adolfo Ochagavía [Tue, 6 Nov 2018 14:53:47 +0000 (15:53 +0100)]
Clarifications and formatting

5 years agoAdd roadmap
Aleksey Kladov [Tue, 6 Nov 2018 13:12:57 +0000 (16:12 +0300)]
Add roadmap

5 years agonew discord
Aleksey Kladov [Tue, 6 Nov 2018 11:47:15 +0000 (14:47 +0300)]
new discord

5 years agoMerge #199
bors[bot] [Tue, 6 Nov 2018 11:13:05 +0000 (11:13 +0000)]
Merge #199

199: Use closing paren as a trigger character r=matklad a=kjeremy

This seems counter-intuitive based on the concept of "trigger character" but it provides a better function signature experience.

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
5 years agoUse closing paren as a trigger character
Jeremy A. Kolb [Mon, 5 Nov 2018 22:13:56 +0000 (17:13 -0500)]
Use closing paren as a trigger character

This seems counter-intuitive based on the concept of "trigger character"
but it provides a better function signature experience.

5 years agoMerge #188
bors[bot] [Mon, 5 Nov 2018 21:32:25 +0000 (21:32 +0000)]
Merge #188

188: Introduce `SyntaxErrorKind` and `TextRange` to `SyntaxError` r=matklad a=aochagavia

Co-authored-by: Adolfo Ochagavía <aochagavia92@gmail.com>
Co-authored-by: Adolfo Ochagavía <github@adolfo.ochagavia.xyz>
5 years agocargo format
Adolfo Ochagavía [Mon, 5 Nov 2018 21:29:33 +0000 (22:29 +0100)]
cargo format

5 years agoIntroduce Location and make SyntaxError fields private
Adolfo Ochagavía [Mon, 5 Nov 2018 17:38:34 +0000 (18:38 +0100)]
Introduce Location and make SyntaxError fields private

5 years agobring back testutils
Aleksey Kladov [Mon, 5 Nov 2018 12:56:07 +0000 (15:56 +0300)]
bring back testutils

5 years agoadd description
Aleksey Kladov [Mon, 5 Nov 2018 12:51:38 +0000 (15:51 +0300)]
add description

5 years agoSwitch ra_syntax to 2015 edition
Aleksey Kladov [Mon, 5 Nov 2018 12:47:59 +0000 (15:47 +0300)]
Switch ra_syntax to 2015 edition

5 years agoIntroduce var works with tail exprs
Aleksey Kladov [Mon, 5 Nov 2018 12:44:34 +0000 (15:44 +0300)]
Introduce var works with tail exprs

5 years agoMerge #194
bors[bot] [Mon, 5 Nov 2018 12:04:13 +0000 (12:04 +0000)]
Merge #194

194: Introduce FilePosition r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoUse FilePosition everywhere
Aleksey Kladov [Mon, 5 Nov 2018 11:57:41 +0000 (14:57 +0300)]
Use FilePosition everywhere

5 years agorename Position to FilePostion
Aleksey Kladov [Mon, 5 Nov 2018 11:24:38 +0000 (14:24 +0300)]
rename Position to FilePostion

5 years agodon't send backtraces for canceled requests
Aleksey Kladov [Mon, 5 Nov 2018 11:22:39 +0000 (14:22 +0300)]
don't send backtraces for canceled requests

5 years agoMerge #193
bors[bot] [Mon, 5 Nov 2018 11:12:04 +0000 (11:12 +0000)]
Merge #193

193: Inline modules r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoFully add inline modules to module tree
Aleksey Kladov [Mon, 5 Nov 2018 11:10:20 +0000 (14:10 +0300)]
Fully add inline modules to module tree

5 years agoSubmodule is enum
Aleksey Kladov [Mon, 5 Nov 2018 10:23:37 +0000 (13:23 +0300)]
Submodule is enum

5 years agocollect all submodules
Aleksey Kladov [Mon, 5 Nov 2018 10:08:52 +0000 (13:08 +0300)]
collect all submodules

5 years agosubmodules works with module sources
Aleksey Kladov [Sun, 4 Nov 2018 17:38:50 +0000 (20:38 +0300)]
submodules works with module sources

5 years agouse module_for_source
Aleksey Kladov [Sun, 4 Nov 2018 17:21:20 +0000 (20:21 +0300)]
use module_for_source

5 years agoIntroduce modules_from_source fn
Aleksey Kladov [Sun, 4 Nov 2018 17:07:25 +0000 (20:07 +0300)]
Introduce modules_from_source fn

5 years agoreduce code duplication
Aleksey Kladov [Mon, 5 Nov 2018 08:39:35 +0000 (11:39 +0300)]
reduce code duplication

5 years agoMerge #192
bors[bot] [Mon, 5 Nov 2018 08:27:15 +0000 (08:27 +0000)]
Merge #192

192: grammar: for predicates in where r=matklad a=matklad

closes #191

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agogrammar: for predicates in where
Aleksey Kladov [Mon, 5 Nov 2018 08:24:02 +0000 (11:24 +0300)]
grammar: for predicates in where

closes #191

5 years agoIntroduce SyntaxErrorKind and TextRange in SyntaxError
Adolfo Ochagavía [Sun, 4 Nov 2018 15:45:22 +0000 (16:45 +0100)]
Introduce SyntaxErrorKind and TextRange in SyntaxError

5 years agoMerge #184
bors[bot] [Sun, 4 Nov 2018 14:47:20 +0000 (14:47 +0000)]
Merge #184

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 <aochagavia92@gmail.com>
5 years agoAdd character literal parsing and validation
Adolfo Ochagavía [Sun, 4 Nov 2018 14:06:38 +0000 (15:06 +0100)]
Add character literal parsing and validation

5 years agoMerge #187
bors[bot] [Sun, 4 Nov 2018 11:09:57 +0000 (11:09 +0000)]
Merge #187

187: Use Default everywhere r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoUse Default everywhere
Aleksey Kladov [Sun, 4 Nov 2018 11:09:21 +0000 (14:09 +0300)]
Use Default everywhere

5 years agoDon't order import alphabetical
Aleksey Kladov [Thu, 1 Nov 2018 13:18:53 +0000 (16:18 +0300)]
Don't order import alphabetical

alphabetical ordering is no more consistent, and much less useful then
the ordering which arises naturally when you add import.

5 years agoDead code
Aleksey Kladov [Thu, 1 Nov 2018 13:00:13 +0000 (16:00 +0300)]
Dead code

5 years agoMerge #183
bors[bot] [Thu, 1 Nov 2018 12:30:52 +0000 (12:30 +0000)]
Merge #183

183: update salsa r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoupdate salsa
Aleksey Kladov [Thu, 1 Nov 2018 12:29:23 +0000 (15:29 +0300)]
update salsa

5 years agoSome docs
Aleksey Kladov [Thu, 1 Nov 2018 11:31:25 +0000 (14:31 +0300)]
Some docs

5 years agoMerge #182
bors[bot] [Thu, 1 Nov 2018 10:53:17 +0000 (10:53 +0000)]
Merge #182

182: Module source r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoAdd inline source
Aleksey Kladov [Wed, 31 Oct 2018 21:50:17 +0000 (00:50 +0300)]
Add inline source

5 years agoIntroduce ModuleSource
Aleksey Kladov [Wed, 31 Oct 2018 21:15:11 +0000 (00:15 +0300)]
Introduce ModuleSource

5 years agoUse From to get an owned AST
Aleksey Kladov [Thu, 1 Nov 2018 10:41:04 +0000 (13:41 +0300)]
Use From to get an owned AST

5 years agoMerge #179
bors[bot] [Thu, 1 Nov 2018 10:16:24 +0000 (10:16 +0000)]
Merge #179

179: Remove DOC_COMMENT r=matklad a=kjeremy

Closes #166

Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
5 years agoremove SyntaxPtrDatabase
Aleksey Kladov [Thu, 1 Nov 2018 10:15:11 +0000 (13:15 +0300)]
remove SyntaxPtrDatabase

5 years agoRemove DOC_COMMENT
Jeremy A. Kolb [Wed, 31 Oct 2018 21:38:18 +0000 (17:38 -0400)]
Remove DOC_COMMENT

Closes #166

5 years agoFix test
Aleksey Kladov [Wed, 31 Oct 2018 21:00:43 +0000 (00:00 +0300)]
Fix test