| Summary: | [acorn] Investigate disabling sourceFile and directSourceFile parser options | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Olivier Thomann <Olivier_Thomann> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Olivier_Thomann |
| Version: | 12.0 | ||
| Target Milestone: | 12.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Michael Rennie
The problem is that some other postParse calls can expect the ast.sourceFile property to be set. So if we set it inside the postParse of the ast tern plugin, we cannot garantee to be the first plugin to be called. If we can, then we can do that. Otherwise we can also change the acorn call to set the sourceFile only on the Program node. I found that the html plugin expects that property to be set to check if the file is a html file. We can discuss that tomorrow. It looks like tern is using the sourceFile object on each node to store some information. So the best I could do was to reduce the footprint of that object. Delivered the change. |