com.google.javascript.jscomp.CheckRegExp.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!
???? 7 ? (com/google/javascript/jscomp/CheckRegExp globalRegExpPropertiesUsed Z
Dcom/google/javascript/jscomp/NodeTraversal$AbstractPostOrderCallback ()V compiler /Lcom/google/javascript/jscomp/AbstractCompiler; reportErrors
*com/google/javascript/jscomp/NodeTraversal traverse ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeTraversal$Callback;)V
%com/google/javascript/jscomp/NodeUtil isReferenceName %(Lcom/google/javascript/rhino/Node;)Z
! " # $ % com/google/javascript/rhino/Node getString ()Ljava/lang/String; ' RegExp
) * + , - java/lang/String equals (Ljava/lang/Object;)Z
/ 0 1 getScope &()Lcom/google/javascript/jscomp/Scope;
3 4 5 6 7 "com/google/javascript/jscomp/Scope getVar >(Ljava/lang/String;)Lcom/google/javascript/jscomp/AbstractVar;
! 9 : ; getToken %()Lcom/google/javascript/rhino/Token;
! = > ?
getFirstChild $()Lcom/google/javascript/rhino/Node; A B C D E !com/google/javascript/rhino/Token NEW #Lcom/google/javascript/rhino/Token; A G H E CALL A J K E
INSTANCEOF A M N E EQ A P Q E NE A S T E SHEQ A V W E SHNE A Y Z E CASE A \ ] E GETPROP _ ` a REGEXP_PROPERTY_SKIPLIST (Lcom/google/common/collect/ImmutableSet;
c d e f - &com/google/common/collect/ImmutableSet contains h i j REGEXP_REFERENCE -Lcom/google/javascript/jscomp/DiagnosticType;
l m n report e(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)V
! p q r isRegExp ()Z
! t u r hasTwoChildren
! w x ? getLastChild z
| } ~ ? -com/google/javascript/jscomp/regex/RegExpTree parseRegExp U(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/regex/RegExpTree; ? "java/lang/IllegalArgumentException ? #java/lang/IndexOutOfBoundsException ? ? j MALFORMED_REGEXP
? ? ? ? % java/lang/RuntimeException
getMessage ? JSC_REGEXP_REFERENCE ? TReferences to the global RegExp object prevents optimization of regular expressions.
? ? ? ? ? +com/google/javascript/jscomp/DiagnosticType warning S(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/DiagnosticType; ? JSC_MALFORMED_REGEXP ? !Malformed Regular Expression: {0} ? $1 ? $2 ? $3 ? $4 ? $5 ? $6 ? $7 ? $8 ? $9 ? $_ ? $input ? input ? lastMatch ? lastParen ? leftContext ? rightContext ? global ?
ignoreCase ? lastIndex ? multiline ? source
c ? ? ? of ?(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet; ? )com/google/javascript/jscomp/CompilerPass Signature ; isGlobalRegExpPropertiesUsed Code LineNumberTable LocalVariableTable this *Lcom/google/javascript/jscomp/CheckRegExp; 3(Lcom/google/javascript/jscomp/AbstractCompiler;Z)V MethodParameters process G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V externs "Lcom/google/javascript/rhino/Node; root visit s(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V
parentType first name Ljava/lang/String; ex Ljava/lang/RuntimeException; pattern flags t ,Lcom/google/javascript/jscomp/NodeTraversal; n parent
StackMapTable
SourceFile CheckRegExp.java InnerClasses AbstractPostOrderCallback ? 3com/google/javascript/jscomp/NodeTraversal$Callback Callback ? i j ? j ` a ? ? ? r ? / *? ? ? G ? ? ? ? ? b *? *? *+?
*? ? ? J D K L M ? ? ? ? ? ? ? L
*?
,*? ? ?
Q R ?
? ?
? ?
? ? ? ? ? ? ? ? ,
,? ? ?,? :&? (? ?+? .? 2? ?-? 8:,-?