Conversation
Perryvw
reviewed
Feb 26, 2019
Member
|
I think the "Clean up APIs" point probably deserves its own PR, I think for now it might be nicest if we just always generate and return the source map from the printer (if that's possible?) and then let whatever is calling it (in the current case the LuaTransformer) choose to emit it or not. We can then look at cleaning up the API together with the rest of the project. |
Member
|
It might also be a nice idea to define |
* Made some adjustments to source maps * Fixed tests * Removed tsOriginal field from AST nodes
# Conflicts: # src/LuaTransformer.ts # src/lualib/StringReplace.ts
# Conflicts: # package-lock.json # src/LuaPrinter.ts # test/compiler/watchmode.spec.ts
* Added override for traceback * Improved sourcemap override * Removed obsolete argument * put traceback override at start of the file after headers * changed 2 underscore identifiers * Added test for sourceMapTraceback * don't enforce prettier linting * use debug.getinfo for file names * Trying to diagnose test issue * No longer check filename in sourcemap test * Another stab at fixing tests
ark120202
reviewed
Mar 30, 2019
# Conflicts: # package.json
ark120202
reviewed
Mar 31, 2019
tomblind
approved these changes
Apr 2, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #237
Sourcemap implementation using Mozillas source map lib (https://github.com/mozilla/source-map). The high-level SourceNode API is used in this draft.
This adds a second runtime dependency, but I think implementing our own version really isn't worth it.
Particularly the part where we would have to write our own Base64 VLQ encoder.
TODOs