Ejemplo n.º 1
0
 public virtual void VisitStaticStatement(BoundStaticVariableStatement x)
 {
 }
Ejemplo n.º 2
0
 public virtual void VisitStaticStatement(BoundStaticVariableStatement x)
 {
     
 }
 public virtual TResult VisitStaticStatement(BoundStaticVariableStatement x) => DefaultVisitOperation(x);
Ejemplo n.º 4
0
        public override void VisitStaticStatement(BoundStaticVariableStatement x)
        {
            foreach (var v in x.Variables)
            {
                var name = v.Variable.Name;

                State.SetVarKind(new VariableName(name), VariableKind.StaticVariable);

                var oldtype = State.GetVarType(name);

                // set var
                if (v.InitialValue != null)
                {
                    // analyse initializer
                    Accept((IPhpOperation)v.InitialValue);

                    State.SetVarInitialized(name);
                    State.LTInt64Max(name, (v.InitialValue.ConstantValue.HasValue && v.InitialValue.ConstantValue.Value is long && (long)v.InitialValue.ConstantValue.Value < long.MaxValue));
                    State.SetVar(name, ((BoundExpression)v.InitialValue).TypeRefMask | oldtype);
                }
                else
                {
                    State.LTInt64Max(name, false);
                }
            }
        }