public EmitOutput Compile(FileName fileName, ITypeScriptOptions options) { host.UpdateCompilerSettings(options); host.UpdateFileName(fileName); context.Run(scriptLoader.GetLanguageServicesCompileScript()); return host.CompilerResult.result; }
public EmitOutput Compile(FileName fileName, ITypeScriptOptions options) { host.UpdateCompilerSettings(options); host.UpdateFileName(fileName); context.Run(scriptLoader.GetLanguageServicesCompileScript()); return(host.CompilerResult.result); }
public Diagnostic[] GetDiagnostics(FileName fileName, ITypeScriptOptions options) { host.UpdateCompilerSettings(options); host.UpdateFileName(fileName); context.Run(scriptLoader.GetDiagnosticsScript()); return(host.SemanticDiagnosticsResult.result.Concat( host.SyntacticDiagnosticsResult.result) .ToArray()); }
public ITypeScriptCompilerResult Compile(IEnumerable <String> files, ITypeScriptOptions options) { if (options == null) { throw new ArgumentNullException("options"); } var strOpt = options.ToOptionsString(); return(Compile(files, strOpt)); }
public CompilerOptions(ITypeScriptOptions options) : this() { removeComments = options.RemoveComments; sourceMap = options.GenerateSourceMap; noImplicitAny = options.NoImplicitAny; target = options.GetScriptTarget(); module = options.GetModuleTarget(); @out = options.GetOutputFileFullPath(); outDir = options.GetOutputDirectoryFullPath(); emitBOM = false; }
public TypeScriptOptions(ITypeScriptOptions options) { RemoveComments = options.RemoveComments; GenerateSourceMap = options.GenerateSourceMap; NoImplicitAny = options.NoImplicitAny; ModuleKind = options.ModuleKind; EcmaScriptVersion = options.EcmaScriptVersion; ModuleTarget = options.GetModuleTarget(); ScriptTarget = options.GetScriptTarget(); OutputFileName = options.GetOutputFileFullPath(); OutputDirectory = options.GetOutputDirectoryFullPath(); }
public TypeScriptOptions(ITypeScriptOptions options) { RemoveComments = options.RemoveComments; GenerateSourceMap = options.GenerateSourceMap; NoImplicitAny = options.NoImplicitAny; ModuleKind = options.ModuleKind; EcmaScriptVersion = options.EcmaScriptVersion; ModuleTarget = options.GetModuleTarget(); ScriptTarget = options.GetScriptTarget(); OutputFileName = options.GetOutputFileFullPath(); OutputDirectory = options.GetOutputDirectoryFullPath(); }
public CompilerOptions(ITypeScriptOptions options) : this() { removeComments = options.RemoveComments; sourceMap = options.GenerateSourceMap; noImplicitAny = options.NoImplicitAny; target = options.GetScriptTarget(); module = options.GetModuleTarget(); @out = options.GetOutputFileFullPath(); outDir = options.GetOutputDirectoryFullPath(); emitBOM = false; }
public LanguageServiceCompilerResult Compile(FileName fileName, ITypeScriptOptions options) { try { EmitOutput result = context.Compile(fileName, options); var compilerResult = new LanguageServiceCompilerResult(result, fileName); if (compilerResult.HasOutputFiles()) { WriteOutputFiles(result.outputFiles); } return compilerResult; } catch (Exception ex) { return new LanguageServiceCompilerResult(ex); } }
public LanguageServiceCompilerResult Compile(FileName fileName, ITypeScriptOptions options) { try { EmitOutput result = context.Compile(fileName, options); var compilerResult = new LanguageServiceCompilerResult(result, fileName); if (compilerResult.HasOutputFiles()) { WriteOutputFiles(result.outputFiles); } return(compilerResult); } catch (Exception ex) { return(new LanguageServiceCompilerResult(ex)); } }
public Diagnostic[] GetDiagnostics(FileName fileName, ITypeScriptOptions options) { if (context == null) { return new [] { GetMicrosoftRuntimeNotInstalledDiagnostic() } } ; host.UpdateCompilerSettings(options); host.UpdateFileName(fileName); context.Run(scriptLoader.GetDiagnosticsScript()); return(host.SemanticDiagnosticsResult.result.Concat( host.SyntacticDiagnosticsResult.result) .ToArray()); }
public Diagnostic[] GetDiagnostics(FileName fileName, ITypeScriptOptions options) { if (context == null) return new [] { GetMicrosoftRuntimeNotInstalledDiagnostic() }; host.UpdateCompilerSettings(options); host.UpdateFileName(fileName); context.Run(scriptLoader.GetDiagnosticsScript()); return host.SemanticDiagnosticsResult.result.Concat( host.SyntacticDiagnosticsResult.result) .ToArray(); }
internal void UpdateCompilerSettings(ITypeScriptOptions options) { compilerSettings = new CompilerOptions(options); }
internal void UpdateCompilerSettings(ITypeScriptOptions options) { compilerSettings = new CompilerOptions(options); }
public Diagnostic[] GetDiagnostics(FileName fileName, ITypeScriptOptions options) { host.UpdateCompilerSettings(options); host.UpdateFileName(fileName); context.Run(scriptLoader.GetDiagnosticsScript()); return host.SemanticDiagnosticsResult.result.Concat( host.SyntacticDiagnosticsResult.result) .ToArray(); }