Skip to content

Commit

Permalink
Add OnBeforeSaveAssembly event.
Browse files Browse the repository at this point in the history
  • Loading branch information
VladD2 committed Aug 24, 2015
1 parent 4922daf commit bba83b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ncc/passes.n
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ namespace Nemerle.Compiler

public event CompilationStart : CompilerEventHandler;
public event TypeTreeBuildFinish : CompilerEventHandler;
public event BeforeSaveAssembly : CompilerEventHandler;

private mutable IdToNameMap : Hashtable[int, string];

Expand All @@ -122,6 +123,11 @@ namespace Nemerle.Compiler
TypeTreeBuildFinish?.Invoke(this);
}

protected OnBeforeSaveAssembly() : void
{
BeforeSaveAssembly?.Invoke(this);
}

internal UpdateMethodsStatistics(currentMethodKey : string, timeSpan : TimeSpan) : void
{
mutable value;
Expand Down Expand Up @@ -714,6 +720,8 @@ namespace Nemerle.Compiler
docs.Save();
}

OnBeforeSaveAssembly();

unless (Options.CompileToMemory)
Hierarchy.SaveAssembly ();

Expand Down

0 comments on commit bba83b2

Please sign in to comment.