Esempio n. 1
0
        public override void CheckSemantics(TigerScope scope, Report report)
        {
            ContainingScope = scope;

            //Check type existence
            var type = scope.FindType(IdNode.Name);

            //Checking existence of array
            if (type != null)
            {
                TigerType = type is SimpleType ? ((SimpleType)type).ActualType : type;
            }
            else
            {
                report.AddError(SemanticErrors.NonExistentTypeReference(IdNode, IdNode.Name));
            }
        }