Skip to content
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

Merged
merged 1 commit into from
Jun 23, 2017
Merged

Add “throws” keyword #4

merged 1 commit into from
Jun 23, 2017

Conversation

dahlia
Copy link
Member

@dahlia dahlia commented Jun 23, 2017

Highlight the keyword throws introduced by nirum-lang/nirum#38 and nirum-lang/nirum#43.

@dahlia dahlia self-assigned this Jun 23, 2017
@dahlia dahlia requested a review from kanghyojun June 23, 2017 06:49
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\)/
Copy link
Member

Choose a reason for hiding this comment

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

throws는 라인의 시작에서 시작되는 키워드가아니라 sym match되는 그룹을 분리하는게 어떨까요?

Copy link
Member Author

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\>/
Copy link
Member

@kanghyojun kanghyojun Jun 23, 2017

Choose a reason for hiding this comment

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

정규식에서 <,>가 특별한 의미가 있나요? vim 특수 문법인가 했는데 검색해봐도 안나오는듯해서 여쭙니당

Copy link
Member Author

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 등에는 매치됩니다.

Copy link
Member

Choose a reason for hiding this comment

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

vim에서 직접해보니 exact match? 같은느낌으로 동작하는거같은데 맞나요?

Copy link
Member

Choose a reason for hiding this comment

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

맞다고한다.

@kanghyojun kanghyojun merged commit dd4b02f into nirum-lang:master Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants