Exemple #1
0
        /// <summary>
        /// Creates new TypeValue from given ClassDecl
        /// </summary>
        /// <param name="declaration">Class declaration</param>
        /// <returns>new TypeValue</returns>
        public TypeValue CreateType(ClassDecl declaration)
        {
            var type = new TypeValue(declaration);

            _statistics.Report(Statistic.CreatedTypeValues);

            return(type);
        }
Exemple #2
0
 /// <inheritdoc />
 public virtual void VisitNativeTypeValue(TypeValue value)
 {
     VisitTypeValue(value);
 }
Exemple #3
0
 /// <summary>
 /// Resolves all possible methods for given methodName
 /// NOTE:
 ///     Multiple declarations for single functionName can happen for example because of branch merging
 /// </summary>
 /// <param name="methodName">Name of resolved method</param>
 /// <param name="selfType">Type where static method is resolved</param>
 /// <returns>Resolved methods</returns>
 protected abstract IEnumerable <FunctionValue> resolveStaticMethod(TypeValue selfType, QualifiedName methodName);
Exemple #4
0
 /// <summary>
 /// Resolve methods with given name for possible value
 /// </summary>
 /// <param name="value">Type of the object</param>
 /// <param name="methodName">Name of resolved methods</param>
 /// <param name="objectMethods">Methods available for thisObject</param>
 /// <returns>Resolved methods</returns>
 public abstract IEnumerable <FunctionValue> ResolveMethods(TypeValue value, QualifiedName methodName, IEnumerable <FunctionValue> objectMethods);
Exemple #5
-1
 /// <summary>
 /// Initialize object of given type
 /// </summary>
 /// <param name="createdObject">Created object that has to be initialized</param>
 /// <param name="type">Desired type of initialized object</param>
 protected abstract void initializeObject(ObjectValue createdObject, TypeValue type);
Exemple #6
-2
 /// <summary>
 /// Declare given type into global context
 /// </summary>
 /// <param name="declaration">Declared type</param>
 protected abstract void declareGlobal(TypeValue declaration);
Exemple #7
-2
 /// <inheritdoc />
 public IEnumerable <FunctionValue> ResolveStaticMethod(TypeValue type, QualifiedName methodName)
 {
     return(resolveStaticMethod(type, methodName));
 }
Exemple #8
-2
 /// <inheritdoc />
 public void DeclareGlobal(TypeValue type)
 {
     _statistics.Report(Statistic.DeclaredTypes);
     declareGlobal(type);
 }