Merge branch 'major/dotting' into major/dotting_partials
commit
de51bb82a1
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Type definitions for the C-based
|
||||
* code emitter
|
||||
*
|
||||
* Authors: Tristan Brice Velloza Kildaire (deavmi)
|
||||
*/
|
||||
module tlang.compiler.codegen.emit.dgen_types;
|
||||
|
||||
import tlang.compiler.codegen.emit.types : CodeEmitterException;
|
||||
import std.string : format;
|
||||
|
||||
/**
|
||||
* An error that occurs during the
|
||||
* code emitting via `DGen`
|
||||
*/
|
||||
public final class DGenException : CodeEmitterException
|
||||
{
|
||||
this(string m)
|
||||
{
|
||||
super(format("DGen: %s", m));
|
||||
}
|
||||
|
||||
this(T...)(string msg, T items)
|
||||
{
|
||||
this(format(msg, items));
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Type definitions for emit module
|
||||
*
|
||||
* Authors: Tristan Brice Velloza Kildaire (deavmi)
|
||||
*/
|
||||
module tlang.compiler.codegen.emit.types;
|
||||
|
||||
import std.datetime : Duration;
|
||||
|
||||
/**
|
||||
* The result after a successful emit
|
||||
*/
|
||||
public struct EmitResult
|
||||
{
|
||||
string createdFile;
|
||||
Duration elapsedTime;
|
||||
|
||||
this(string createdFile, Duration elapsed)
|
||||
{
|
||||
this.createdFile = createdFile;
|
||||
this.elapsedTime = elapsed;
|
||||
}
|
||||
}
|
||||
|
||||
import tlang.misc.exceptions : TError;
|
||||
import std.string : format;
|
||||
|
||||
/**
|
||||
* An error that occurs during
|
||||
* the code emitting process
|
||||
*/
|
||||
public class CodeEmitterException : TError
|
||||
{
|
||||
this(string m)
|
||||
{
|
||||
super(format("CodeEmit: %s", m));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue