From 99ef85deb3a83d9f0eb8214cf95e86ecd3156178 Mon Sep 17 00:00:00 2001 From: arookas Date: Sun, 7 Feb 2016 17:02:34 -0500 Subject: [PATCH] Renamed resolver API methods --- ssc/compiler.cs | 6 +++--- ssc/import.cs | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ssc/compiler.cs b/ssc/compiler.cs index 0a142bf..a681f29 100644 --- a/ssc/compiler.cs +++ b/ssc/compiler.cs @@ -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(); diff --git a/ssc/import.cs b/ssc/import.cs index c5bf4e6..3ec6fde 100644 --- a/ssc/import.cs +++ b/ssc/import.cs @@ -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 = "";