Commit Graph

23 Commits

Author SHA1 Message Date
Paul Daniel Faria 2199d0cda9 Fix type names broken by rebase, redo expected test because of rebase 2020-08-10 08:46:34 -04:00
Paul Daniel Faria a6af0272f7 Move semantic logic into Semantics, fix missing tag for safe amp operator, using functional methods rather than clunky inline closure 2020-08-10 08:46:34 -04:00
Paul Daniel Faria 55633f3404 Fix rebase errors 2020-08-10 08:44:54 -04:00
bors[bot] 7a03f05eac Merge #5692
5692: Add support for extern crate r=jonas-schievink a=Nashenas88

This adds syntax highlighting, hover and goto def functionality for extern crate.

Fixes #5690 

Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
2020-08-09 23:16:58 +00:00
Paul Daniel Faria 6cde0b1aa0 Add support for extern crate
This adds syntax highlighting, hover and goto def
functionality for extern crate
2020-08-08 14:14:18 -04:00
bors[bot] 8a57afe5a4 Merge #5684
5684: Semantic highlighting for unsafe union field access r=jonas-schievink a=Nashenas88

This change adds support for unions in inference and lowering, then extends on that to add the unsafe semantic modifier on field access only. The `is_possibly_unsafe` function in `syntax_highlighting.rs` could be extended to support fns and static muts so that their definitions are not highlighted as unsafe, but only their usage.

Also, each commit of this PR updates the tests. By reviewing the files by commit, it's easy to see how the changes in the code affected the tests.

Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
2020-08-08 16:45:37 +00:00
Paul Daniel Faria be935b2b56 Apply unsafe semantic highlighting to union field access 2020-08-08 11:29:56 -04:00
Paul Daniel Faria 3bf033e548 Add support for unions in inference and lowering 2020-08-08 11:29:56 -04:00
Paul Daniel Faria a6532905a9 Add test for unsafe union field access highlighting 2020-08-06 21:15:31 -04:00
Paul Daniel Faria 8e657f663d Mark static mutable names as unsafe 2020-08-06 20:07:42 -04:00
Paul Daniel Faria 6be528da0d Add test for accessing static mut 2020-08-06 19:58:37 -04:00
Paul Daniel Faria 4e2e3543c7 When resolving a rename, fallback to the name higher in the use tree if the path segment is self 2020-08-04 09:28:40 -04:00
Paul Daniel Faria cc3eb85311 Add test showing unresolved module rename 2020-08-04 09:26:38 -04:00
Aleksey Kladov ba585309ec Replace rand with oorandom 2020-07-29 19:49:10 +02:00
GrayJack 5ca3855c06 On second thought, we want to preserve the textMate here where all punctuation that are from a Attr be highlited as Attribute 2020-07-20 23:37:31 -03:00
GrayJack 04d8dc4a10 # as Attribute
- Issue  #5453
2020-07-20 23:19:29 -03:00
GrayJack a662228de4 Assingment semantic highlight 2020-07-20 12:36:23 -03:00
GrayJack 54ebb2ce30 Handle semantic highlight when STAR is part of the *{const, mut} 2020-07-20 11:21:40 -03:00
Leander Tentrup 119e71d9ea Add new Punctuation highlight tag 2020-07-15 16:42:47 +02:00
Leander Tentrup 33832d43fc Highlight punctuation as HighlightTag::Operator 2020-07-15 16:40:38 +02:00
Lukas Wirth 91b35d8827 Semantic Highlighting: Emit mutable modifier for 'self' when applicable 2020-07-13 21:39:01 +02:00
Aleksey Kladov e1d6b7f7c4 Use dedicated semantic highlight tag for parameters
closes #5106
2020-07-11 14:51:41 +02:00
Aleksey Kladov 05d67a9a0e Move test data to test_data directory 2020-07-01 11:26:09 +02:00