Skip to content
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

Source empty if script contains only comments #169

Closed
czosel opened this issue Aug 4, 2018 · 1 comment
Closed

Source empty if script contains only comments #169

czosel opened this issue Aug 4, 2018 · 1 comment
Assignees

Comments

@czosel
Copy link
Collaborator

czosel commented Aug 4, 2018

I found another edge case: the source attribute of the program node is empty, if the file contains nothing but comments:

<?php
//test
{
  "kind": "program",
  "loc": {
    "source": "",

vs.

<?php
//test
echo 1;
{
  "kind": "program",
  "loc": {
    "source": "<?php\n//test\necho 1;",
@ichiriac
Copy link
Member

ichiriac commented Sep 3, 2018

need to test, but should be fixed in 3.0.0-prerelease.3

@ichiriac ichiriac closed this as completed Sep 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants