Example #1
0
        private TypeBase ResolveTypeRef(TypeRef typeRef)
        {
            TypeBase resolvedType = PrimaryType.Unknown;
            var name = typeRef.TypeName;

            if (!m_types.Contains(name.Content))
            {
                AddError(c_SE_TypeNameMissing, name.Span, name.Content);
            }
            else
            {
                typeRef.Type = m_types[name.Content];
                resolvedType = typeRef.Type;
            }

            return resolvedType;
        }
Example #2
0
        private TypeBase ResolveTypeRef(TypeRef typeRef)
        {
            TypeBase resolvedType = PrimaryType.Unknown;
            var name = typeRef.TypeName;

            if (!m_types.Contains(name.Value))
            {
                m_errorManager.AddError(MemberDeclResolver.c_SE_TypeNameMissing, name.Span, name.Value);
            }
            else
            {
                typeRef.Type = m_types[name.Value];
                resolvedType = typeRef.Type;
            }

            return resolvedType;
        }
Example #3
0
 public NewObject(LexemeValue typeName)
 {
     Type = new TypeRef(typeName);
 }