Created
December 24, 2012 10:14
-
-
Save anonymous/4368720 to your computer and use it in GitHub Desktop.
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
let ast = SyntaxTree.ParseText badCode | |
let root = ast.GetRoot() | |
let compiler = compile ast | |
ignore <| compiler.Emit(@"original.dll") | |
//Fix bad code | |
let model = compiler.GetSemanticModel(ast) | |
let root' = root.Accept(FixBadUseOfCountRewriter(model, true)) :?> CompilationUnitSyntax | |
let ast' = SyntaxTree.Create(root') | |
let compiler' = compile ast' | |
ignore <| compiler'.Emit(@"fixed.dll") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment