-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Program location info slightly off #1024
Comments
Re: Re: |
@kpdecker Re: |
Undefined is perfectly valid json. On Fri, May 22, 2015 at 1:56 PM Martin Muñoz [email protected]
|
Test case:
|
@mmun would you argue that this test case is incorrect now? eee2c4d#diff-162dcff9d8009bd8efba3ccd7ee514d9R240 |
@kpdecker Yes, I would argue they are incorrect. The block helper program node test should be |
There appears to be a bug in our use of jison causing the parent location information to be reported to programs. I wasn’t able to work through what might be causing this so instead using the location information of the statements collection to generate the proper location information. This is a bit of a hack but we are very far behind on the Jison release train and upgrading will likely be a less than pleasant task that doesn’t provide us much benefit. Fixes handlebars-lang#1024
The location info of a program that belongs to a block is slightly off. Specifically, the
loc.start
for both the main and inverse are set to the beginning of the block's mustache rather than the end.Here's a JSBin illustrating it for 3.0.3: http://jsbin.com/yemadanida/1/edit?html,js,console
I also think
loc.source
should be set tonull
instead ofundefined
because it's JSONifyable and it's what's documented anyways.The text was updated successfully, but these errors were encountered: