morbig
morbig copied to clipboard
Positions are still wrong
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
}
}
}
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.