Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Added impl capture. #96

Merged
merged 6 commits into from
May 2, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions grammars/rust.cson
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,16 @@
]
}
# Implementation
{
'comment': 'Implementation'
'begin': '\\b(impl)\\b'
'end': '\\{'
'beginCaptures': {
'1': { 'name': 'storage.type.rust' }
}
'patterns': [
'comment': 'Implementation'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose you shouldn't have removed the line.
Why did you do that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was accidental! 😱 Apologies.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maccoda,
Okay. Revert it and the brace at the end which you have deleted.

'begin': '\\b(impl)(?:<[\'a-zA-Z]+>)? ([\\w]+)( for )?([\\w]+)?(?:<[\'a-zA-Z]+>)?\\b'
'end': '\\{'
'beginCaptures': {
'1': { 'name': 'storage.type.rust' }
'2': { 'name': 'entity.name.type.rust' }
'3': { 'name': 'storage.type.rust' }
'4': { 'name': 'entity.name.type.rust' }
}
'patterns': [
{ 'include': '#block_comment' }
{ 'include': '#line_comment' }
{ 'include': '#sigils' }
Expand All @@ -429,5 +431,5 @@
'match': '\\bfor\\b'
}
]
}
]