com.google.javascript.jscomp.CodePrinter$PrettyCodePrinter.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler-unshaded Show documentation
Show all versions of closure-compiler-unshaded Show documentation
Closure Compiler is a JavaScript optimizing compiler. It parses your
JavaScript, analyzes it, removes dead code and rewrites and minimizes
what's left. It also checks syntax, variable references, and types, and
warns about common JavaScript pitfalls. It is used in many of Google's
JavaScript apps, including Gmail, Google Web Search, Google Maps, and
Google Docs.
The newest version!
???? 70
:com/google/javascript/jscomp/CodePrinter$MappedCodePrinter r(IZLcom/google/javascript/jscomp/SourceMap$DetailLevel;Lcom/google/javascript/jscomp/CodePrinter$LicenseTracker;)V
:com/google/javascript/jscomp/CodePrinter$PrettyCodePrinter indent I
lineLength
isInTemplateLiteral ()Z code Ljava/lang/StringBuilder;
java/lang/StringBuilder append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
! " # $ % java/lang/String length ()I
' ( (Ljava/lang/String;)V
* + , - . /com/google/javascript/jscomp/base/JSCompDoubles
isPositive (D)Z
0 1 2 3 4 java/lang/Double valueOf (D)Ljava/lang/Double;
6 7 8 9 : $com/google/common/base/Preconditions
checkState (ZLjava/lang/Object;)V
< = > getNumberFromSource 6(Lcom/google/javascript/rhino/Node;)Ljava/lang/String;
@ A B addNumber &(DLcom/google/javascript/rhino/Node;)V
0 D E F parseDouble (Ljava/lang/String;)D H java/lang/NumberFormatException
J K ( addConstant
M N (C)Ljava/lang/StringBuilder; P Q lineIndex
S T U maybeCutLine ()V W X lineLengthThreshold
Z [ U startNewLine
] ^ U maybeInsertSpace ` {
b c ( add
e f U maybeEndStatement
h i U endLine k } m ,
o p U maybeLineBreak r ,
t u v endFunction (Z)V
x y U
beginCaseBody
{ | U endCaseBody
~ ? getLastChar ()C
! ? ? ? charAt (I)C ?
? ? ? ? com/google/javascript/rhino/Node isBlock
? ? ? isAddedBlock
? ? ? hasParent
? ? ? ? getParent $()Lcom/google/javascript/rhino/Node;
? ? ? isIf
? ? ? ? hasXChildren (I)Z
? ? ? ? getLastChild
? ? ? hasOneChild
? ? ? ?
getFirstChild
? ? ? ? getGrandparent
? ? ? ? getToken %()Lcom/google/javascript/rhino/Token; ? ? ? ? ? *com/google/javascript/jscomp/CodePrinter$1 ,$SwitchMap$com$google$javascript$rhino$Token [I
? ? ? ? % !com/google/javascript/rhino/Token ordinal
? ? ? getTryForCatch F(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
? ? ? ? ? %com/google/javascript/jscomp/NodeUtil
hasFinally %(Lcom/google/javascript/rhino/Node;)Z ? ; ? ? ? statementNeedsEnded Z
? ? ? isNumber
? ? ? ?
getSourceFile R(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/StaticSourceFile; ? 'com/google/javascript/jscomp/SourceFile
? ? ? ? getCode ()Ljava/lang/String; ? java/io/IOException
? ? ? % getSourceOffset ? "java/lang/IllegalArgumentException
? ? ? % getLength
! ? ? ? substring (II)Ljava/lang/String; INDENT Ljava/lang/String;
ConstantValue Code LineNumberTable LocalVariableTable this