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

Program.ToString() does not return correct js content #26

Closed
ionuttamas opened this issue Jun 6, 2018 · 2 comments
Closed

Program.ToString() does not return correct js content #26

ionuttamas opened this issue Jun 6, 2018 · 2 comments

Comments

@ionuttamas
Copy link

Doing:

var program = new JavaScriptParser().Parse(js); Assert.AreEqual(js, program.ToString())

does not work. Is there a way to get the js text value from the program?

@lahma
Copy link
Collaborator

lahma commented Jun 18, 2018

Why don't you just keep a record of the js content you used to get the parsed version? Parsing produces AST which is quite hard to backtrack to original string format.

@sebastienros
Copy link
Owner

Duplicate of #8

@sebastienros sebastienros marked this as a duplicate of #8 Aug 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants