com.google.javascript.jscomp.deps.JsFileRegexParser.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?
2com/google/javascript/jscomp/deps/JsFileLineParser .(Lcom/google/javascript/jscomp/ErrorManager;)V
3com/google/javascript/jscomp/deps/JsFileRegexParser GOOG_PROVIDE_REQUIRE_PATTERN Ljava/util/regex/Pattern;
java/util/regex/Pattern matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; googMatcher Ljava/util/regex/Matcher; ES6_MODULE_PATTERN
es6Matcher ! " googMatcherBuffer Ljava/lang/String; $ % & ' ( .com/google/javascript/jscomp/deps/ModuleLoader EMPTY 0Lcom/google/javascript/jscomp/deps/ModuleLoader; * + ( loader - . / seenLoadModule Z 1 2 / includeGoogBase
4 5 6 isSupported ()Z
8 9 : ; < $com/google/common/base/Preconditions
checkState (Z)V > java/io/StringReader
= @ A (Ljava/lang/String;)V
C D E parseReader h(Ljava/lang/String;Ljava/lang/String;Ljava/io/Reader;)Lcom/google/javascript/jscomp/deps/DependencyInfo; G java/util/ArrayList
F I J ()V L M N provides Ljava/util/List; P Q N requires S T N typeRequires V W / fileHasProvidesOrRequires Y Z / hasExternsAnnotation \ ] / hasNoCompileAnnotation
$ _ ` a resolve O(Ljava/lang/String;)Lcom/google/javascript/jscomp/deps/ModuleLoader$ModulePath; c d e file ;Lcom/google/javascript/jscomp/deps/ModuleLoader$ModulePath; g h i j k >com/google/javascript/jscomp/deps/JsFileRegexParser$ModuleType
NON_MODULE @Lcom/google/javascript/jscomp/deps/JsFileRegexParser$ModuleType; m n k
moduleType p q r logger Ljava/util/logging/Logger; t u v w x java/util/logging/Level FINE Ljava/util/logging/Level;
z { | } ~ java/util/logging/Logger
isLoggable (Ljava/util/logging/Level;)Z ? ? ? makeConcatWithConstants &(Ljava/lang/String;)Ljava/lang/String;
z ? ? A fine
? ? ? doParse %(Ljava/lang/String;Ljava/io/Reader;)V g ? ? k
ES6_MODULE
? ? ? ? ? 9com/google/javascript/jscomp/deps/ModuleLoader$ModulePath toModuleName ()Ljava/lang/String; ? ? ? ? ? java/util/List add (Ljava/lang/Object;)Z ? java/util/LinkedHashMap
? I ? ? ? ? ? 5com/google/javascript/jscomp/deps/JsFileRegexParser$1 I$SwitchMap$com$google$javascript$jscomp$deps$JsFileRegexParser$ModuleType [I
g ? ? ? ordinal ()I ? module ? goog ? ? ? ? ?
java/util/Map put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? es6
? ? ? ? ? 6com/google/javascript/jscomp/deps/SimpleDependencyInfo builder f(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/deps/SimpleDependencyInfo$Builder;
? ? ? ? ? >com/google/javascript/jscomp/deps/SimpleDependencyInfo$Builder setProvides X(Ljava/util/Collection;)Lcom/google/javascript/jscomp/deps/SimpleDependencyInfo$Builder;
? ? ? ? setRequires
? ? ? ? setTypeRequires
? ? ? ? setLoadFlags Q(Ljava/util/Map;)Lcom/google/javascript/jscomp/deps/SimpleDependencyInfo$Builder;
? ? ? ? setHasExternsAnnotation C(Z)Lcom/google/javascript/jscomp/deps/SimpleDependencyInfo$Builder;
? ? ? ? setHasNoCompileAnnotation
? ? ? ? build :()Lcom/google/javascript/jscomp/deps/SimpleDependencyInfo; ? ? ? F(Lcom/google/javascript/jscomp/deps/DependencyInfo;)Ljava/lang/String; g ? ? k GOOG_PROVIDE g ? ? k GOOG_MODULE ? ? ? errorManager +Lcom/google/javascript/jscomp/ErrorManager; ? ? ? ? ? 'com/google/javascript/jscomp/CheckLevel WARNING )Lcom/google/javascript/jscomp/CheckLevel;
? ? ? ? toString $ ? ? ? MODULE_CONFLICT -Lcom/google/javascript/jscomp/DiagnosticType; ? java/lang/String
? ? ? ? ? $com/google/javascript/jscomp/JSError make |(Ljava/lang/String;IILcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)Lcom/google/javascript/jscomp/JSError; ? ? ? ? ? )com/google/javascript/jscomp/ErrorManager report R(Lcom/google/javascript/jscomp/CheckLevel;Lcom/google/javascript/jscomp/JSError;)V ? @provideGoog
? ? ? contains (Ljava/lang/CharSequence;)Z @externs
@nocompile
java/util/regex/Matcher reset
6 find 8com/google/javascript/jscomp/deps/DependencyInfo$Require BASE :Lcom/google/javascript/jscomp/deps/DependencyInfo$Require; func
? group
? charAt (I)C
setModuleType C(Lcom/google/javascript/jscomp/deps/JsFileRegexParser$ModuleType;)Z! args
#$ ?
parseJsString& requireType
?() ? equals
+,- googRequireSymbol N(Ljava/lang/String;)Lcom/google/javascript/jscomp/deps/DependencyInfo$Require;/ goog.loadModule(function(
?123
startsWith (Ljava/lang/String;)Z5 provide7 require9
addDependency; declareModuleId
?=> 6 isEmpty@ java/lang/CharSequence
?BCD join E(Ljava/lang/CharSequence;[Ljava/lang/CharSequence;)Ljava/lang/String;
FG3 applyGoogMatcherI importK export
MN (I)Ljava/lang/String;P goog:
?RSN substring UV " filePath XYZ lineNum I
\] ? start
?_`a resolveJsModule c(Ljava/lang/String;Ljava/lang/String;II)Lcom/google/javascript/jscomp/deps/ModuleLoader$ModulePath;
?cd a resolveModuleAsPath
fgh es6Import `(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/deps/DependencyInfo$Require; jk ES6_EXPORT_PATTERN
mn 6 lookingAt pq / shortcutMode
stuvw "com/google/common/base/CharMatcher
whitespace &()Lcom/google/common/base/CharMatcher;
syz matchesAllOf| ;~ goog.setTestOnly? "goog.module.declareLegacyNamespace
???? ? java/lang/Class getName
z??? getLogger .(Ljava/lang/String;)Ljava/util/logging/Logger;? ?(?:^|;)(?:[a-zA-Z0-9$_,:{}\s]+=)?\s*goog\.(?provide|module|require|requireType|addDependency|declareModuleId)\s*\(\s*(?.*?)\s*\)
??? compile -(Ljava/lang/String;)Ljava/util/regex/Pattern;? R^(?:import|export)\b\s*(?:[a-zA-Z0-9$_*,{}\s]+\bfrom\s*|)(?:['"]([^'"]+)['"])?\s*;? ^export\b PROVIDES_GOOG_COMMENT
ConstantValue EXTERNS_COMMENT NOCOMPILE_COMMENT BUNDLED_GOOG_MODULE_START Signature $Ljava/util/List; LLjava/util/List; Code LineNumberTable LocalVariableTable this 5Lcom/google/javascript/jscomp/deps/JsFileRegexParser; MethodParameters setIncludeGoogBase 8(Z)Lcom/google/javascript/jscomp/deps/JsFileRegexParser; include RuntimeInvisibleAnnotations 8Lcom/google/errorprone/annotations/CanIgnoreReturnValue; setModuleLoader g(Lcom/google/javascript/jscomp/deps/ModuleLoader;)Lcom/google/javascript/jscomp/deps/JsFileRegexParser; parseFile j(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/deps/DependencyInfo; closureRelativePath fileContents Ljava/io/Reader; loadFlags Ljava/util/Map; dependencyInfo 2Lcom/google/javascript/jscomp/deps/DependencyInfo; LocalVariableTypeTable 5Ljava/util/Map;
StackMapTable? 0com/google/javascript/jscomp/deps/DependencyInfo type es6Module
googModule provideGoogModuleConflict provideEs6ModuleConflict googEs6ModuleConflict parseJsDocCommentLine line arg
methodName firstChar C isDeclareModuleNamespace isModule isProvide providesNamespace isRequire lineHasProvidesOrRequires
Exceptions? Acom/google/javascript/jscomp/deps/JsFileLineParser$ParseException parseLine path lineHasProvidesOrRequiresWords
SourceFile JsFileRegexParser.java /Lcom/google/common/annotations/GwtIncompatible; value java.util.regex NestMembers BootstrapMethods?
??? ?? $java/lang/invoke/StringConcatFactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;? Parsing Source: ?
DepInfo: InnerClasses
ModulePath
ModuleType Builder Require ParseException? %java/lang/invoke/MethodHandles$Lookup? java/lang/invoke/MethodHandles Lookup 1 q r k ? " ? ? ? " ? ? " ? ? " ? . ! " M N ? ? Q N ? ? T N ? ? W / Z / ] / + ( d e n k . / 2 / ? ? 5*+? *?
? ? *?
? ? *
? *? #? )*? ,*? 0? ? " ? e h k # u * ? / ? 4 ?? 5?? 5 ? ? ? ? ?? ? I
? 3? 7*? 0*? ? ? ? ??
??
? / ? ? ? ? ?? ? ? *+? )*? ?
? ?? ?? + ( ? + ? ? ?? ? W *+,? =Y-? ?? B? ? ?? * ?? V " ? " ? " ?
V ? ? D E ? ( *? FY? H? K*? FY? H? O*? FY? H? R*? U*? X*? [**? )+? ^? b*? f? l*? ,*
? ? o? s? y? ? o+? ? ?*+-? ?*? l? ?? *? K*? b? ?? ? W? ?Y? ?:? ?*? l? ?.? 7 (??? ? W? ??? ? W? ,+? ?*? K? ?*? O? ?*? R? ?? ?*? X? ?*? [? ̶ ?:? o? s? y? ? o? ? ? ?? ? ? ! ? ? ? ! ? &