Axiom.Scripting.Compiler.ScriptCompiler._loadImportPath C# (CSharp) Метод

_loadImportPath() приватный Метод

Loads the requested script and converts it to an AST
private _loadImportPath ( string name ) : IList
name string
Результат IList
		private IList<AbstractNode> _loadImportPath( string name )
		{
			IList<AbstractNode> retval = null;
			IList<ConcreteNode> nodes = null;

			if ( this.OnImportFile != null )
				this.OnImportFile( this, name );

			if ( nodes != null && ResourceGroupManager.Instance != null )
			{
				using ( Stream stream = ResourceGroupManager.Instance.OpenResource( name, _resourceGroup ) )
				{
					if ( stream != null )
					{
						ScriptLexer lexer = new ScriptLexer();
						ScriptParser parser = new ScriptParser();
						IList<ScriptToken> tokens = null;
						using ( StreamReader reader = new StreamReader( stream ) )
						{
							tokens = lexer.Tokenize( reader.ReadToEnd(), name );
						}
						nodes = parser.Parse( tokens );
					}
				}
			}

			if ( nodes != null )
				retval = _convertToAST( nodes );

			return retval;
		}