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

Support binary number literals (e.g. 0b0, 0b1011) #89

Merged
merged 4 commits into from Sep 15, 2018

Conversation

Projects
None yet
3 participants
@tyru
Member

tyru commented Sep 14, 2018

I found Vim script has binary number literals (e.g. 0b0, 0b1011), and they are not supported yet.
Fixed tokenizer to support it.

Sorry, I don't check from when the literal format is supported...

@tyru tyru requested review from mattn, rhysd and haya14busa Sep 14, 2018

@tyru

This comment has been minimized.

Show comment
Hide comment
@tyru

tyru Sep 14, 2018

Member

I added test cases:

  • "0B..." (large B)
  • "0X..." (large X) (I found tests were missing)
Member

tyru commented Sep 14, 2018

I added test cases:

  • "0B..." (large B)
  • "0X..." (large X) (I found tests were missing)
@rhysd

This comment has been minimized.

Show comment
Hide comment
@rhysd

rhysd Sep 14, 2018

Member

I found Vim script has binary number literals (e.g. 0b0, 0b1011)

しらなかった…

Member

rhysd commented Sep 14, 2018

I found Vim script has binary number literals (e.g. 0b0, 0b1011)

しらなかった…

@rhysd

rhysd approved these changes Sep 14, 2018

@tyru

This comment has been minimized.

Show comment
Hide comment
@tyru

tyru Sep 14, 2018

Member

We should handle this too?

Vim script,:echo 0b0123 は :echo 0b01 23 に解釈されるのね…エラーじゃないのか

https://twitter.com/Linda_pp/status/1040620461921427456

Member

tyru commented Sep 14, 2018

We should handle this too?

Vim script,:echo 0b0123 は :echo 0b01 23 に解釈されるのね…エラーじゃないのか

https://twitter.com/Linda_pp/status/1040620461921427456

@tyru

This comment has been minimized.

Show comment
Hide comment
@tyru

tyru Sep 14, 2018

Member

:echo 0b0123 は :echo 0b01 23

It seems to work already. added a test.

Member

tyru commented Sep 14, 2018

:echo 0b0123 は :echo 0b01 23

It seems to work already. added a test.

@tyru

This comment has been minimized.

Show comment
Hide comment
@tyru

tyru Sep 15, 2018

Member

I will merge this at 9/15 24:00

Member

tyru commented Sep 15, 2018

I will merge this at 9/15 24:00

@tyru tyru merged commit 1a1cc96 into master Sep 15, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@tyru tyru deleted the support-bin-number branch Sep 15, 2018

@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Sep 15, 2018

Member

I found Vim script has binary number literals (e.g. 0b0, 0b1011)

FYI, This was introduced by 7.4.1027.

Member

k-takata commented Sep 15, 2018

I found Vim script has binary number literals (e.g. 0b0, 0b1011)

FYI, This was introduced by 7.4.1027.

@tyru

This comment has been minimized.

Show comment
Hide comment
@tyru

tyru Sep 15, 2018

Member

Thanks for checking!

Member

tyru commented Sep 15, 2018

Thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment