Babel.Compiler.TypeCheckingVisitor.VisitTypeSpecifier C# (CSharp) Method

VisitTypeSpecifier() public method

public VisitTypeSpecifier ( TypeSpecifier typeSpecifier ) : void
typeSpecifier TypeSpecifier
return void
        public override void VisitTypeSpecifier(TypeSpecifier typeSpecifier)
        {
            typeSpecifier.TypeParameters.Accept(this);
            if (typeSpecifier.Kind == TypeKind.Same) {
                typeSpecifier.NodeType = currentClass.BoundTypeData;
            }
            else {
                TypeData type =
                    currentClass.GetTypeParameter(typeSpecifier.Name);
                if (type == null) {
                    type = typeManager.GetType(typeSpecifier,
                                        currentSouceFile.ImportedNamespaces);
                }
                if (type == null) {
                    report.Error(typeSpecifier.Location,
                                 "there is no class named {0}",
                                 typeSpecifier);
                    return;
                }
                typeSpecifier.NodeType = type;
            }
        }