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

Positions are still wrong #74

Open
yurug opened this issue Mar 17, 2019 · 1 comment
Open

Positions are still wrong #74

yurug opened this issue Mar 17, 2019 · 1 comment
Assignees

Comments

@yurug
Copy link
Contributor

yurug commented Mar 17, 2019

The column numbers of starting position are still wrong, as demonstrated by the following example:

true

which produces the following JSON for the word true:

"CmdName_Word",
                                      {
                                        "value": [
                                          "Word",
                                          "true",
                                          [ [ "WordName", "true" ] ]
                                        ],
                                        "position": {
                                          "start_p": {
                                            "pos_fname": "true.sh",
                                            "pos_lnum": 1,
                                            "pos_bol": 0,
                                            "pos_cnum": 4
                                          },
                                          "end_p": {
                                            "pos_fname": "true.sh",
                                            "pos_lnum": 2,
                                            "pos_bol": 5,
                                            "pos_cnum": 5
                                          }
                                        }
                                      }
@yurug yurug self-assigned this Mar 17, 2019
@Niols
Copy link
Member

Niols commented Nov 25, 2019

This is, as of today, still the case. It has to do with the fact that Morbig, once it has delimited a token, only knows the position of the delimiter, and not the token itself. It would require a form of "position-aware" token buffer.

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

No branches or pull requests

2 participants