# \`lezer-generator\` errors/warnings contain 1-based lines and 0-based columns

**URL:** https://discuss.codemirror.net/t/lezer-generator-errors-warnings-contain-1-based-lines-and-0-based-columns/9409
**Category:** Lezer
**Created:** [August 31, 2025, 6:23am UTC](https://discuss.codemirror.net/t/lezer-generator-errors-warnings-contain-1-based-lines-and-0-based-columns/9409 "2025-08-31T06:23:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![martijnwalraven](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/martijnwalraven/32/3817_2.png) [@martijnwalraven](https://discuss.codemirror.net/u/martijnwalraven)
#### Post date: [August 31, 2025, 6:23am UTC](https://discuss.codemirror.net/t/lezer-generator-errors-warnings-contain-1-based-lines-and-0-based-columns/9409/1 "2025-08-31T06:23:14Z")

</div>

I’m not sure whether this is an oversight or expected behavior, but the errors/warnings from `lezer-generator` seem to contain 1-based lines and 0-based columns as part of their message. This can lead to misleading context with tools that expect both to be 1-based (e.g. in a VS Code problem matcher).

I think changing either `lineInfo` or `message` would fix this. If the `ch` computed in `lineInfo` is meant to be 0-based, it would be helpful to at least adjust the message to contain 1-based lines and columns.

> <https://github.com/lezer-parser/generator/blob/5ebf7e208f3c77f05f11ba6719ad819ab78f241c/src/parse.ts#L29-L48>

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)
#### Post date: [September 1, 2025, 3:34pm UTC](https://discuss.codemirror.net/t/lezer-generator-errors-warnings-contain-1-based-lines-and-0-based-columns/9409/2 "2025-09-01T15:34:49Z")

</div>

This is expected behavior. CodeMirror works the same way, as do many tools that refer to lines/columns.
