public ClassAndFunctionToken(Scope scope, ClassToken classToken, DotToken dotToken, FunctionCallToken funcToken, Definitions.FunctionDefinition funcDef)
     : base(scope)
 {
     AddToken(classToken);
     AddToken(dotToken);
     AddToken(_funcToken = funcToken);
 }
Exemple #2
0
        private DataType _dataType;             // Can be null

        /// <summary>
        /// Creates a function call token.
        /// </summary>
        /// <param name="scope">(required) Current scope</param>
        /// <param name="classToken">(optional) Class name token</param>
        /// <param name="dotToken">(optional) Dot delimiter between class and function name</param>
        /// <param name="nameToken">(required) Function name</param>
        /// <param name="argsToken">(required) Function args</param>
        /// <param name="def">(optional) Existing function definition</param>
        public FunctionCallToken(Scope scope, ClassToken classToken, DotToken dotToken, IdentifierToken nameToken, BracketsToken argsToken, FunctionDefinition def)
            : base(scope)
        {
#if DEBUG
            if (nameToken == null)
            {
                throw new ArgumentNullException("nameToken");
            }
            if (argsToken == null)
            {
                throw new ArgumentNullException("argsToken");
            }
#endif
            AddToken(_classToken = classToken);
            AddToken(dotToken);
            AddToken(_nameToken         = nameToken);
            _nameToken.SourceDefinition = def;
            AddToken(_argsToken         = argsToken);

            _dataType = def.DataType;
        }