public static Config createConfig( LanguageMode languageMode, Set<String> extraAnnotationNames, StrictMode strictMode) { return createConfig( languageMode, JsDocParsing.TYPES_ONLY, RunMode.STOP_AFTER_ERROR, extraAnnotationNames, true, strictMode); }
public static Config createConfig(boolean isIdeMode, boolean parseJsDocDocumentation, boolean preserveJsDocWhitespace, LanguageMode languageMode, Set<String> extraAnnotationNames) { initResourceConfig(); Set<String> effectiveAnnotationNames; if (extraAnnotationNames == null) { effectiveAnnotationNames = annotationNames; } else { effectiveAnnotationNames = new HashSet<String>(annotationNames); effectiveAnnotationNames.addAll(extraAnnotationNames); } return new Config(effectiveAnnotationNames, suppressionNames, isIdeMode, parseJsDocDocumentation, preserveJsDocWhitespace, languageMode); }
protected Config createConfig(Config.LanguageMode mode, Config.StrictMode strictMode) { Config config = ParserRunner.createConfig( mode, options.isParseJsDocDocumentation(), options.canContinueAfterErrors() ? Config.RunMode.KEEP_GOING : Config.RunMode.STOP_AFTER_ERROR, options.extraAnnotationNames, options.parseInlineSourceMaps, strictMode); return config; }
protected Config createConfig(Config.LanguageMode mode) { return ParserRunner.createConfig( isIdeMode(), options.isParseJsDocDocumentation(), options.isPreserveJsDocWhitespace(), mode, options.extraAnnotationNames); }
public SourceProcessor(ConfigurationCommon config, String uri, String source) { this.uri = uri; this.source = source; this.instrumenter = new ParseTreeInstrumenter(uri, config.isIncludeFunction(), commentsHandler); this.branchInstrumentor = new BranchInstrumentor(uri, config.isDetectCoalesce(), commentsHandler); this.config = ParserRunner.createConfig(config.getECMAVersion(), INCLUDE_DESCRIPTIONS_WITH_WHITESPACE, KEEP_GOING, null, false, Config.StrictMode.SLOPPY); this.options.setPreferSingleQuotes(true); this.options.setPrettyPrint(true); this.includeBranchCoverage = config.isIncludeBranch(); this.includeFunctionCoverage = config.isIncludeFunction(); this.localStorage = config.isLocalStorage(); this.isolateBrowser = config.isolateBrowser(); }
public SourceProcessor(ConfigurationCommon config, String uri, String source) { this.uri = uri; this.source = source; this.instrumenter = new ParseTreeInstrumenter(uri, config.isIncludeFunction(), commentsHandler); this.branchInstrumentor = new BranchInstrumentor(uri, config.isDetectCoalesce(), commentsHandler); this.config = ParserRunner.createConfig(config.getECMAVersion(), INCLUDE_DESCRIPTIONS_WITH_WHITESPACE, KEEP_GOING, null, false, Config.StrictMode.SLOPPY); this.options.setPreferSingleQuotes(true); this.options.setPrettyPrint(true); this.includeBranchCoverage = config.isIncludeBranch(); this.includeFunctionCoverage = config.isIncludeFunction(); this.localStorage = config.isLocalStorage(); this.isolateBrowser = config.isolateBrowser(); }