Added: new import resolver system which allows for custom user import resolving.
This commit is contained in:
parent
08864e5e1f
commit
e08b2dc888
7 changed files with 213 additions and 129 deletions
|
@ -28,12 +28,12 @@
|
|||
|
||||
public override void Compile(sunContext context)
|
||||
{
|
||||
var file = context.Imports.ResolveImport(this);
|
||||
if (file == null)
|
||||
var result = context.Import(ImportFile.Value);
|
||||
switch (result)
|
||||
{
|
||||
return; // the file has already been imported
|
||||
case sunImportResult.Missing:
|
||||
case sunImportResult.FailedToLoad: throw new sunMissingImportException(this);
|
||||
}
|
||||
context.Compile(file);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue