예제 #1
0
        //------------------------------------------------------------
        /// <summary>
        /// NewExpression:
        ///   "new" TypePath FunctionCallExpression
        /// </summary>
        /// <returns></returns>
        IExpression parseNewExpression()
        {
            // "new"
            System.Diagnostics.Debug.Assert(currentToken().Value == Token.Kind.KeyNew);
            nextToken();

            // TypePath
            TypePath typePath = parseTypePath();

            if (typePath == null)
            {
                return(null);
            }

            // FunctionCallExpression
            FunctionCallExpression funcCallExpr = parseFunctionCallExpression();

            if (funcCallExpr == null)
            {
                return(null);
            }

            return(new NewExpression(typePath, funcCallExpr));
        }
예제 #2
0
 //------------------------------------------------------------
 // コンストラクタ。
 public NewExpression(TypePath aTypePath, FunctionCallExpression aFuncCallExpr)
 {
     mTypePath     = aTypePath;
     mFuncCallExpr = aFuncCallExpr;
 }