Package com.google.javascript.jscomp
Class RewriteCallerCodeLocation
java.lang.Object
com.google.javascript.jscomp.RewriteCallerCodeLocation
- All Implemented Interfaces:
CompilerPass
Rewrites call-sites of functions that have goog.callerLocation as a default parameter.
E.g: function signal(val, here: goog.CodeLocation = goog.callerLocation()) {}
When a function is called without providing the optional `here` argument, we will rewrite the function call to include the code location.
i.e. `signal(0, goog.callerLocationIdInternalDoNotCallOrElse(path/to/file.ts:lineno:charno))`
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
GOOG_CALLER_LOCATION_QUALIFIED_NAME
-
-
Constructor Details
-
RewriteCallerCodeLocation
Creates an instance.
-
-
Method Details
-
process
Description copied from interface:CompilerPass
Process the JS with root node root. Can modify the contents of each Node tree- Specified by:
process
in interfaceCompilerPass
- Parameters:
externs
- Top of external JS treeroot
- Top of JS tree
-