Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83110 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23199 invoked from network); 18 Feb 2015 19:34:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 19:34:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:46389] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/56-25021-049E4E45 for ; Wed, 18 Feb 2015 14:34:25 -0500 Received: by mail-wi0-f173.google.com with SMTP id bs8so43413133wib.0 for ; Wed, 18 Feb 2015 11:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tYg+bd0wIOiLf9mmBo6kHrurnvIESsKNNDLKGmqYZDc=; b=P7k2KzJ3UQ2vPIxtkcArpskdT2EX8ACgiUPg8CjzVhPm7ItUuj+C2Xn7uLN35K0paw 8FOGr5XJj3hVGqkkxioYJizeX8qRgvpNMlVORcnDkSJ8wmlpmeZyoGq1GRmmZ5Ldr2qb +iRD3o9AUbHr2vAAJBhuHOe2Jo5mLW0EJs3vJuHfoYe/02DxA0Pn2DrpI4U440ji0LF/ S7K5o9k3WJsiq58YADx/nJoEIf65o54GRF8t+It/77bSjA6quHiubemOUtOa1x0JD5H9 vxqJhcGGu/0c2foepd58J7JGXLcUy+KKOvPKAc8yqlz/VGWbkqZqscnxd3SvEVlOSE7k RTqw== MIME-Version: 1.0 X-Received: by 10.194.71.110 with SMTP id t14mr1951957wju.58.1424288061836; Wed, 18 Feb 2015 11:34:21 -0800 (PST) Received: by 10.194.154.229 with HTTP; Wed, 18 Feb 2015 11:34:21 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Feb 2015 23:34:21 +0400 Message-ID: To: Dmitry Stogov Cc: Nikita Popov , Nikita Popov , PHP internals list Content-Type: multipart/alternative; boundary=047d7bfd0bd6fbd24a050f61e771 Subject: Re: [PHP-DEV] [RFC][Discussion] Parser extension API From: lisachenko.it@gmail.com (Alexander Lisachenko) --047d7bfd0bd6fbd24a050f61e771 Content-Type: text/plain; charset=UTF-8 2015-02-18 22:22 GMT+03:00 Dmitry Stogov : > I think the AST API shouldn't use "public" properties. > Using it, we will have to construct the whole tree of objects, duplicating > information from AST. > I would propose SimpleXML approach instead - construct object only for > node(s) we currently access. What about Generators? They can be used nicely for handling AST data. And each node can be constructed as needed during the traversal. Probably this way is better than ArrayAccess --047d7bfd0bd6fbd24a050f61e771--