machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js

Home Page:http://emblemjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better error reporting

thec0keman opened this issue · comments

This issue is to discuss / track possible changes so that Emblem can give more useful feedback when a compile error happens.

PEGjs added some better tracing and error support in 0.9, so it is possible there are some options here as well.
(Waiting on a PR upstream)

I once made a pull request #191, which would have fixed this in earlier versions.
Or did it make into the new version?

As explained, PEGjs will backtrack to the first named rule it encounters...
as it stands now, it will backtrack all the way back...
and after trying all cases it will throw an error, which will be on the root of the current html block

but we can stop backtracking way sooner... I try to look at my code again and see if I remember the logic behind it...
I can try to do it again... but much changed

pegjs import seems unmaintained for long

Yeah it has mostly gone silent. Kind of a bummer, but it is still very useful!

what about forking emblems dependency which are not maintained?