1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

Move AppEnv into CommonWalker

This commit is contained in:
Kevin Glynn 2011-01-07 16:13:20 +01:00
parent 6c19bc33a7
commit 31ce3adc19
2 changed files with 10 additions and 7 deletions

View File

@ -5,12 +5,20 @@ using System.Text;
using Antlr.Runtime.Tree;
using Antlr.Runtime;
using RusticiSoftware.Translator.Utils;
using RusticiSoftware.Translator.CLR;
namespace RusticiSoftware.Translator.CSharp
{
public class CommonWalker : TreeParser
{
public CS2JSettings Cfg { get; set; }
public string Filename { get; set; }
public CS2JSettings Cfg { get; set; }
public string Filename { get; set; }
// AppEnv contains a summary of the environment within which we are translating, it maps fully qualified type names to their
// translation templates (i.e. a description of their public features)
public DirectoryHT<TypeRepTemplate> AppEnv {get; set;}
protected CommonWalker(ITreeNodeStream input, RecognizerSharedState state)
: base(input, state)

View File

@ -29,16 +29,11 @@ scope NSContext {
using System.Text;
using System.Linq;
using RusticiSoftware.Translator.CLR;
using RusticiSoftware.Translator.Utils;
}
@members
{
// This is the environment that we are building, it maps fully qualified type names to their
// translation templates
public DirectoryHT<TypeRepTemplate> AppEnv {get; set;}
protected UseRepTemplate[] NameSpaceContext {
get {
// We return the elements in source order (hopefully less confusing)