Exemple #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="access">Modus d'acces.</param>
 /// <param name="arguments">Llista d'argument.</param>
 /// <param name="initializers">llista d'inicialitzadors.</param>
 /// <param name="body">El bloc de codi.</param>
 ///
 public ConstructorDeclaration(AccessSpecifier access, ArgumentDeclarationList arguments, ConstructorInitializerList initializers, BlockStatement body)
 {
     Access            = access;
     this.arguments    = arguments;
     this.initializers = initializers;
     Body = body;
 }
Exemple #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name">El nom.</param>
        /// <param name="access">Especificador d'acces.</param>
        /// <param name="returnType">El tipus de retorn.</param>
        /// <param name="arguments">Llista d'arguments.</param>
        /// <param name="body">Les instruccions.</param>
        ///
        public FunctionDeclaration(string name, AccessSpecifier access, TypeIdentifier returnType, ArgumentDeclarationList arguments,
                                   Statement body)
        {
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            Name           = name;
            Access         = access;
            ReturnType     = returnType;
            this.arguments = arguments;
            Body           = body;
        }
Exemple #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="access">Modus d'acces.</param>
 /// <param name="arguments">Llista d'argument.</param>
 /// <param name="initializers">llista d'inicialitzadors.</param>
 /// <param name="statements">Llista d'instruccions.</param>
 ///
 public ConstructorDeclaration(AccessSpecifier access, ArgumentDeclarationList arguments, ConstructorInitializerList initializers, StatementList statements) :
     this(access, arguments, initializers, new BlockStatement(statements))
 {
 }
Exemple #4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="name">El nom.</param>
 /// <param name="access">Especificador d'acces.</param>
 /// <param name="returnType">El tipus de retorn.</param>
 /// <param name="arguments">Llista d'arguments.</param>
 /// <param name="statements">La llista d'instruccions.</param>
 ///
 public FunctionDeclaration(string name, AccessSpecifier access, TypeIdentifier returnType, ArgumentDeclarationList arguments,
                            StatementList statements) :
     this(name, access, returnType, arguments, new BlockStatement(statements))
 {
 }