Ejemplo n.º 1
0
 public ProgramRegister(string name,
                        string typeName,
                        IEnumerable <ProgramRegister> childRegisters = null,
                        bool isArray       = false,
                        int arrayDimension = 0,
                        string arrayType   = null,
                        GeneroLanguageVersion minimumBdlVersion = GeneroLanguageVersion.None,
                        GeneroLanguageVersion maximumBdlVersion = GeneroLanguageVersion.Latest)
 {
     _parentRegister = null;
     _name           = name;
     _typeName       = typeName;
     _minBdlVersion  = minimumBdlVersion;
     _maxBdlVersion  = maximumBdlVersion;
     _isArray        = isArray;
     _arrayDimension = arrayDimension;
     if (arrayType != null)
     {
         _arrayType = new VariableTypeResult
         {
             Typename = arrayType
         };
     }
     _childRegisters = new Dictionary <string, ProgramRegister>(StringComparer.OrdinalIgnoreCase);
     if (childRegisters != null)
     {
         foreach (var reg in childRegisters)
         {
             reg._parentRegister = this;
             _childRegisters.Add(reg._name, reg);
         }
     }
 }
Ejemplo n.º 2
0
        public IAnalysisResult GetMember(GetMemberInput input)
        {
            ProgramRegister progReg = null;

            if (_childRegisters != null)
            {
                _childRegisters.TryGetValue(input.Name, out progReg);
            }
            else
            {
            }
            return(progReg);
        }
Ejemplo n.º 3
0
        public IAnalysisResult GetMember(string name, Genero4glAst ast, out IGeneroProject definingProject, out IProjectEntry projEntry, bool function)
        {
            definingProject = null;
            projEntry       = null;
            ProgramRegister progReg = null;

            if (_childRegisters != null)
            {
                _childRegisters.TryGetValue(name, out progReg);
            }
            else
            {
            }
            return(progReg);
        }
Ejemplo n.º 4
0
 public ProgramRegister(string name, string typeName, IEnumerable <ProgramRegister> childRegisters = null)
 {
     _parentRegister = null;
     _name           = name;
     _typeName       = typeName;
     _childRegisters = new Dictionary <string, ProgramRegister>(StringComparer.OrdinalIgnoreCase);
     if (childRegisters != null)
     {
         foreach (var reg in childRegisters)
         {
             reg._parentRegister = this;
             _childRegisters.Add(reg._name, reg);
         }
     }
 }