Renamed resolver API methods
This commit is contained in:
parent
2bab0f4389
commit
99ef85deb3
2 changed files with 9 additions and 9 deletions
|
@ -145,12 +145,12 @@ namespace arookas {
|
|||
throw new ArgumentNullException("name");
|
||||
}
|
||||
sunScriptFile file;
|
||||
var result = mResolver.ResolveImport(name, out file);
|
||||
var result = mResolver.Resolve(name, out file);
|
||||
if (result == sunImportResult.Loaded) {
|
||||
try {
|
||||
mResolver.EnterFile(file);
|
||||
mResolver.Enter(file);
|
||||
mParser.Parse(file).Compile(this);
|
||||
mResolver.ExitFile(file);
|
||||
mResolver.Exit(file);
|
||||
}
|
||||
finally {
|
||||
file.Dispose();
|
||||
|
|
|
@ -9,9 +9,9 @@ namespace arookas {
|
|||
get { return new sunDefaultImportResolver(); }
|
||||
}
|
||||
|
||||
public abstract void EnterFile(sunScriptFile file);
|
||||
public abstract void ExitFile(sunScriptFile file);
|
||||
public abstract sunImportResult ResolveImport(string name, out sunScriptFile file);
|
||||
public abstract void Enter(sunScriptFile file);
|
||||
public abstract void Exit(sunScriptFile file);
|
||||
public abstract sunImportResult Resolve(string name, out sunScriptFile file);
|
||||
|
||||
// default implementation
|
||||
sealed class sunDefaultImportResolver : sunImportResolver {
|
||||
|
@ -36,13 +36,13 @@ namespace arookas {
|
|||
mCurrentDirectory = Directory.GetCurrentDirectory();
|
||||
}
|
||||
|
||||
public override void EnterFile(sunScriptFile file) {
|
||||
public override void Enter(sunScriptFile file) {
|
||||
mFiles.Push(file);
|
||||
}
|
||||
public override void ExitFile(sunScriptFile file) {
|
||||
public override void Exit(sunScriptFile file) {
|
||||
mFiles.Pop();
|
||||
}
|
||||
public override sunImportResult ResolveImport(string name, out sunScriptFile file) {
|
||||
public override sunImportResult Resolve(string name, out sunScriptFile file) {
|
||||
file = null;
|
||||
name = name.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
var path = "";
|
||||
|
|
Loading…
Reference in a new issue