Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83144 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11321 invoked from network); 19 Feb 2015 05:42:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 05:42:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.217.178 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.217.178 mail-lb0-f178.google.com Received: from [209.85.217.178] ([209.85.217.178:39761] helo=mail-lb0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/00-08822-3C775E45 for ; Thu, 19 Feb 2015 00:42:27 -0500 Received: by lbvn10 with SMTP id n10so5565202lbv.6 for ; Wed, 18 Feb 2015 21:42:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=2A2YDPEFTyvM0JWHQFF0xHNvrNZFTjMW1fX/yXXqKB8=; b=cdLVofikS4ETEpr9bDjQ5jTAOGqDWOeNufOf3jTrejuGIxx6qpu+wfyT7ctcfBBTFP v3o4bIW+rn2foa87yEGLIpJo5FsrSy6atpNAuAWxm6bTtxln1oPoHosRsiQFseBdhyIr F6uFwi9JT0821B1jv5h5oIRxMjn38aSPvwN0/DM8sklZK0+l7CF3yQdWjWzCG5yHAlpL QpHxCL29KyUqRUtohM9f5rboj4fkSB9BZSIuzQvsLJLGBjXpSXr4AB2dehQFD78CPaGv 2K/SkAsmTG7WNCiolupVRtcRqb9lKs1eJHTRBpX9HYQR3JHgA3QTL7ai3qEp0UkM5y5/ 6gDw== X-Gm-Message-State: ALoCoQlg8o0IZCeePn+g0MsbD7G7RR0aXcg+gZBSCkiTXCMxtAi/HDnj6/Ee/BsWDJM9+1C6ZOgs MIME-Version: 1.0 X-Received: by 10.112.235.10 with SMTP id ui10mr2376792lbc.77.1424324543820; Wed, 18 Feb 2015 21:42:23 -0800 (PST) Sender: php@golemon.com Received: by 10.112.38.73 with HTTP; Wed, 18 Feb 2015 21:42:23 -0800 (PST) X-Originating-IP: [199.201.64.2] In-Reply-To: References: Date: Wed, 18 Feb 2015 21:42:23 -0800 X-Google-Sender-Auth: 5SGxa0g1unjc-ey-MAwknIbRa6E Message-ID: To: Dmitry Stogov Cc: Nikita Popov , Alexander Lisachenko , Nikita Popov , PHP internals list Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][Discussion] Parser extension API From: pollita@php.net (Sara Golemon) On Wed, Feb 18, 2015 at 11:22 AM, Dmitry Stogov wrote: > 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. > > So at first we will construct just single object referring to AST root. > Then traversing it we will create and destroy objects for necessary nodes. > I'm not sure if you've seen my astkit extension, but it does this. https://github.com/sgolemon/astkit -Sara