Exemple #1
0
        public Class(ComponentReader reader)
        {
            reader.CheckTag(Tag);

            canonicalName = new CanonicalNameReference(reader);

            fileUri         = new UriReference(reader);
            startFileOffset = new FileOffset(reader);
            fileOffset      = new FileOffset(reader);
            fileEndOffset   = new FileOffset(reader);

            flags = (Flag)reader.ReadByte();

            name           = new StringReference(reader);
            annotations    = reader.ReadList(r => r.ReadExpression());
            typeParameters = reader.ReadList(r => new TypeParameter(r));

            superClass = reader.ReadOption(r => r.ReadDartType());

            mixedInType                    = reader.ReadOption(r => r.ReadDartType());
            implementedClasses             = reader.ReadList(r => r.ReadDartType());
            fields                         = reader.ReadList(r => new Field(r));
            constructors                   = reader.ReadList(r => new Constructor(r));
            procedures                     = reader.ReadList(r => new Procedure(r));
            redirectingFactoryConstructors = reader.ReadList(r => new RedirectingFactoryConstructor(r));
        }
Exemple #2
0
        public Procedure(ComponentReader reader)
        {
            var s = reader.Position;

            reader.CheckTag(Tag);

            canonicalName   = new CanonicalNameReference(reader);
            fileUri         = new UriReference(reader);
            startFileOffset = new FileOffset(reader);

            fileOffset    = new FileOffset(reader);
            fileEndOffset = new FileOffset(reader);
            kind          = (ProcedureKind)reader.ReadByte();
            flags         = (Flag)reader.ReadByte();
            name          = new Name(reader);
            annotations   = reader.ReadList(r => r.ReadExpression());

            // #V12
            forwardingStubSuperTarget     = reader.ReadOption(r => new MemberReference(r));
            forwardingStubInterfaceTarget = reader.ReadOption(r => new MemberReference(r));

            // #V18?
            //forwardingStubSuperTarget = new MemberReference(reader);
            //forwardingStubInterfaceTarget = new MemberReference(reader);

            function = reader.ReadOption(r => new FunctionNode(r));
        }
Exemple #3
0
        public Field(ComponentReader reader)
        {
            reader.CheckTag(Tag);

            canonicalName = new CanonicalNameReference(reader);
            fileUri       = new UriReference(reader);
            fileOffset    = new FileOffset(reader);
            fileEndOffset = new FileOffset(reader);
            flags         = (Flag)reader.ReadByte();
            name          = new Name(reader);
            annotations   = reader.ReadList(r => r.ReadExpression());
            type          = reader.ReadDartType();
            initializer   = reader.ReadOption(r => r.ReadExpression());
        }
Exemple #4
0
        public Constructor(ComponentReader reader)
        {
            reader.CheckTag(Tag);

            canonicalName   = new CanonicalNameReference(reader);
            fileUri         = new UriReference(reader);
            startFileOffset = new FileOffset(reader);
            fileOffset      = new FileOffset(reader);
            fileEndOffset   = new FileOffset(reader);
            flags           = (Flag)reader.ReadByte();
            name            = new Name(reader);
            annotations     = reader.ReadList(r => r.ReadExpression());
            function        = new FunctionNode(reader);
            initializers    = reader.ReadList(r => r.ReadInitializer());
        }
Exemple #5
0
        public RedirectingFactoryConstructor(ComponentReader reader)
        {
            reader.CheckTag(Tag);

            canonicalName = new CanonicalNameReference(reader);
            fileUri       = new UriReference(reader);
            fileOffset    = new FileOffset(reader);
            fileEndOffset = new FileOffset(reader);

            flags = reader.ReadByte();

            name                   = new Name(reader);
            annotations            = reader.ReadList(r => r.ReadExpression());
            targetReference        = new MemberReference(reader);
            typeArguments          = reader.ReadList(r => r.ReadDartType());
            typeParameters         = reader.ReadList(r => new TypeParameter(r));
            parameterCount         = reader.ReadUint();
            requiredParameterCount = reader.ReadUint();
            positionalParameters   = reader.ReadList(r => new VariableDeclaration(r));
            namedParameters        = reader.ReadList(r => new VariableDeclaration(r));
        }