machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

Better error reporting #276

Closed thec0keman closed 5 years ago

thec0keman commented 8 years ago

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)

patricklx commented 7 years ago

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

auvipy commented 7 years ago

pegjs import seems unmaintained for long

thec0keman commented 7 years ago

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

auvipy commented 7 years ago

what about forking emblems dependency which are not maintained?