Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Incorrect calculation of line and position in utf-8 files #78

Open
SerafimArts opened this issue Nov 1, 2017 · 2 comments
Open

Incorrect calculation of line and position in utf-8 files #78

SerafimArts opened this issue Nov 1, 2017 · 2 comments

Comments

@SerafimArts
Copy link
Contributor

SerafimArts commented Nov 1, 2017

Example code with an error on the last line:

type A {
    some(arg: String = "😺 😸 😹 😻 😼 😽 πŸ™€ 😿 😾"): Any
}

😿

Expected (line 5 and column 1):

Unrecognized token "😿" at line 5 and column 1:
😿
↑ <- arrow here

Actual (line 1 and column 89):

Unrecognized token "😿" at line 1 and column 89:
type A {
    some(arg: String = "😺 😸 😹 😻 😼 😽 πŸ™€ 😿 😾"): Any
}

😿some

                                                             ↑ <- arrow here
@flip111
Copy link

flip111 commented Jan 25, 2019

@SerafimArts i might take a look at this bug, but please make it easy for me and provide runnable test code (i don't need a full hoa Test case).

It would be good to fix this bug together with #97 at the same time.

@SerafimArts
Copy link
Contributor Author

Just write any character from the UTF 4bytes group to reproduce the problem.

grammar:

%skip space \s

text:

    
  
          😺 😸 😹 😻 😼 😽 πŸ™€ 😿 😾 
 

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

No branches or pull requests

3 participants