Bridgeconn / usfm-grammar

An elegant USFM parser.
https://usfmgrammar.vachanengine.org/
MIT License
36 stars 14 forks source link

Missing elements are not reported as error #173

Open kavitharaju opened 1 year ago

kavitharaju commented 1 year ago

When given an input like this without a chapter number

\\id gen \\c \\p \\v 1 test

We can see a MISSING info in the syntax tree.

(File (book (id (bookcode) (description))) (chapter (c (MISSING chapterNumber)) (paragraph (p (v (verseNumber)) (verseText (text))))))

But this can't be queried to report as error!

This issue on tree-sitter repo talks about this