Package org.dojotoolkit.shrinksafe
Class TokenMapper
java.lang.Object
org.dojotoolkit.shrinksafe.TokenMapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenterNestingLevel(int braceNesting) getDebugData(Integer functionPosition) voidbooleanleaveNestingLevel(int braceNesting) voidreset()intsourceCompress(String encodedSource, int offset, boolean asQuotedString, StringBuffer sb, int prevToken, boolean inArgsList, int currentLevel, ReplacedTokens replacedTokens) Compress the script
-
Constructor Details
-
TokenMapper
public TokenMapper(org.mozilla.javascript.ast.ScriptNode parseTree)
-
-
Method Details
-
incrementFunctionNumber
public void incrementFunctionNumber() -
sourceCompress
public int sourceCompress(String encodedSource, int offset, boolean asQuotedString, StringBuffer sb, int prevToken, boolean inArgsList, int currentLevel, ReplacedTokens replacedTokens) Compress the script- Parameters:
encodedSource- encoded source stringoffset- position within the encoded sourceasQuotedString- boolean value indicating a quoted stringsb- String buffer referenceprevToken- Previous token in encoded sourceinArgsList- boolean value indicating position inside arguments listcurrentLevel- embeded function levelparseTree- Mapping of each function node and corresponding parameters invalid input: '&' variables names- Returns:
- compressed script
-
enterNestingLevel
public void enterNestingLevel(int braceNesting) -
leaveNestingLevel
public boolean leaveNestingLevel(int braceNesting) -
getCurrentTokens
-
getDebugData
-
reset
public void reset()
-