示例#1
0
        public SourceFieldSymbol(SourceNamedTypeSymbol type, string name, PhpMemberAttributes modifiers, PHPDocBlock phpdoc, BoundExpression initializer = null)
        {
            Contract.ThrowIfNull(type);
            Contract.ThrowIfNull(name);

            _type           = type;
            _name           = name;
            _modifiers      = modifiers;
            _phpdoc         = phpdoc;
            _initializerOpt = initializer;
        }
示例#2
0
        public SourceMethodSymbol(SourceNamedTypeSymbol /*!*/ type, MethodDecl /*!*/ syntax)
        {
            Contract.ThrowIfNull(type);
            Contract.ThrowIfNull(syntax);

            _type   = type;
            _syntax = syntax;

            // TODO: lazily; when using late static binding in a static method, add special <static> parameter, where runtime passes late static bound type
            _params = BuildParameters(syntax.Signature, syntax.PHPDoc).AsImmutable();
        }
示例#3
0
            public override void VisitTypeDecl(TypeDecl x)
            {
                var type = new SourceNamedTypeSymbol(_currentFile, x);

                x.SetProperty(type);    // remember bound function symbol

                _tables._declaredtypes.Add(type);

                if (!x.IsConditional)
                {
                    _tables._types.Add(x.MakeQualifiedName(), type);
                }

                //
                base.VisitTypeDecl(x);
            }
示例#4
0
 public SynthesizedPhpNewMethodSymbol(SourceNamedTypeSymbol container)
     : base(container, WellKnownPchpNames.PhpNewMethodName, false, false, container.DeclaringCompilation.CoreTypes.Void, Accessibility.Public)
 {
     Debug.Assert(!container.IsStatic);
     _parameters = default(ImmutableArray <ParameterSymbol>); // lazy initialized
 }
示例#5
0
 public SynthesizedPhpCtorSymbol(SourceNamedTypeSymbol /*!*/ container)
     : base(container)
 {
     _parameters = default(ImmutableArray <ParameterSymbol>); // lazy initialized
 }
示例#6
0
 public SourceRuntimeConstantSymbol(SourceNamedTypeSymbol type, string name, PHPDocBlock phpdoc, BoundExpression initializer = null)
     : base(type, name, PhpMemberAttributes.Public, phpdoc, initializer)
 {
 }
示例#7
0
 public SourceConstSymbol(SourceNamedTypeSymbol type, string name, PHPDocBlock phpdoc, Syntax.AST.Expression value)
     : base(type, name, PhpMemberAttributes.Public | PhpMemberAttributes.Static, phpdoc)
 {
     _value = value;
 }
示例#8
0
 public SynthesizedStaticFieldsHolder(SourceNamedTypeSymbol @class)
 {
     Contract.ThrowIfNull(@class);
     _class = @class;
 }