Added: new import resolver system which allows for custom user import resolving.

This commit is contained in:
arookas 2015-12-08 20:11:35 -05:00
parent 08864e5e1f
commit e08b2dc888
7 changed files with 213 additions and 129 deletions

View file

@ -33,6 +33,27 @@ namespace arookas
}
}
public class sunImportException : sunCompilerException
{
public string Name { get; private set; }
public sunImportResult Result { get; private set; }
public override string Message { get { return String.Format("Name: {0}, Result: {1}", Name, Result); } }
public sunImportException(string name, sunImportResult result)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (!result.IsDefined())
{
throw new ArgumentOutOfRangeException("name");
}
Name = name;
Result = result;
}
}
// wrapper around Grammatica exceptions
class sunParserException : sunScriptException
{