-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add “throws” keyword #4
Conversation
syntax/nirum.vim
Outdated
@@ -1,5 +1,5 @@ | |||
syn match NirumComment /#.*/ | |||
syn match NirumKeyword /^\(record\|enum\|unboxed\|type\|union\|service\|import\)/ | |||
syn match NirumKeyword /^\(record\|enum\|unboxed\|type\|union\|service\|import\|throws\)/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throws
는 라인의 시작에서 시작되는 키워드가아니라 sym match
되는 그룹을 분리하는게 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
@@ -1,13 +1,15 @@ | |||
syn match NirumComment /#.*/ | |||
syn match NirumKeyword /^\(record\|enum\|unboxed\|type\|union\|service\|import\)/ | |||
syn match NirumTypeDecl /^\(record\|enum\|unboxed\|type\|union\|service\|import\)/ | |||
syn match NirumMethodKeyword /\<throws\>/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정규식에서 <
,>
가 특별한 의미가 있나요? vim 특수 문법인가 했는데 검색해봐도 안나오는듯해서 여쭙니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
파이썬 정규표현식의 \b
같은 겁니다. 단어의 바운더리에 매치됩니다. 예를 들어 athrowsb
, a throwsb
, athrows b
등에는 매치되지 않지만 a throws b
, a throws
, throws b
, ) throws b
등에는 매치됩니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vim에서 직접해보니 exact match? 같은느낌으로 동작하는거같은데 맞나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
맞다고한다.
Highlight the keyword
throws
introduced by nirum-lang/nirum#38 and nirum-lang/nirum#43.