Created
February 23, 2015 07:39
-
-
Save chrisber/789d59372e9b41e657d9 to your computer and use it in GitHub Desktop.
Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void CleanupSemanticCache() | |
{ | |
var ls = v8Engine.GlobalObject.GetProperty("languageService"); | |
var resultHandle = ls.Call("cleanupSemanticCache", null); | |
} | |
public static Diagnostic[] GetSyntacticDiagnostics(string fileName) | |
{ | |
Handle fileNameHandle = v8Engine.CreateValue(fileName); | |
var ls = v8Engine.GlobalObject.GetProperty("languageService"); | |
var resultHandle = ls.Call("getSyntacticDiagnostics", null, fileNameHandle); | |
Diagnostic[] diagnostics = TypeMapper<Diagnostic[]>(resultHandle); | |
return diagnostics; | |
} | |
public static Diagnostic[] GetSemanticDiagnostics(string fileName) | |
{ | |
Handle fileNameHandle = v8Engine.CreateValue(fileName); | |
var ls = v8Engine.GlobalObject.GetProperty("languageService"); | |
var resultHandle = ls.Call("getSemanticDiagnostics", null, fileNameHandle); | |
Diagnostic[] diagnostics = TypeMapper<Diagnostic[]>(resultHandle); | |
return diagnostics; | |
} | |
public static Diagnostic[] GetCompilerOptionsDiagnostics() | |
{ | |
var ls = v8Engine.GlobalObject.GetProperty("languageService"); | |
var resultHandle = ls.Call("getCompilerOptionsDiagnostics", null); | |
Diagnostic[] diagnostics = TypeMapper<Diagnostic[]>(resultHandle); | |
return diagnostics; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment