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

[Bug]: end offset of AST node is incorrect #39

Open
sxzz opened this issue Aug 13, 2024 · 0 comments
Open

[Bug]: end offset of AST node is incorrect #39

sxzz opened this issue Aug 13, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sxzz
Copy link

sxzz commented Aug 13, 2024

To reproduce:

1

https://ast.sxzz.moe/#eNqrVspRslIqr8jNUdJRKoAydQsSi4pTi4AiyUARQyCdD6Sra5VqAVDcDaY=

Current behavior:

{
  "type": "Program",
  "body": [
    {
      "type": "WXText",
      "value": "1",
      "start": 0,
      "end": 0,
      "range": [0, 0]
    }
  ],
  "comments": [],
  "errors": [],
  "tokens": [],
  "start": 0,
  "end": 0,
  "range": [0, 0]
}

Expected behavior:

{
  "type": "Program",
  "body": [
    {
      "type": "WXText",
      "value": "1",
      "start": 0,
---     "end": 0,
+++     "end": 1,
---     "range": [0, 0]
+++     "range": [0, 1]
    }
  ],
  "comments": [],
  "errors": [],
  "tokens": [],
  "start": 0,
--"end": 0,
++"end": 1,
--"range": [0, 0]
++"range": [0, 1]
}

Environment information:

BTW, maybe you can take a look this #38

@sxzz sxzz added the bug Something isn't working label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants