Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109527 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21848 invoked from network); 4 Apr 2020 09:24:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Apr 2020 09:24:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 386DA1804C2 for ; Sat, 4 Apr 2020 00:51:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 4 Apr 2020 00:51:20 -0700 (PDT) Received: by mail-qk1-f173.google.com with SMTP id o18so7870092qko.12 for ; Sat, 04 Apr 2020 00:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rNN641S5wYxqPr30NIP+1NvaKTC27FIX/r/acRV5M5U=; b=Fhu75Zz71tN4eOeY5wnGcnog4RDKewJ31wHupL/uPT5bC9Pd2AZ/P1EIRP24GPKMhT LIGpJNh3VcUpBsXpKzgTXLYPdKRj+5p6G+9Nta7/KLvZUgIPJwSCNfzeCg//1stY8/UU GXwUg9DFvnTZ/Kk9z4jJP03iArbaDhveb6Ofo9xlxaL/Pw1VvSTwQH/HSUmDORDjvdC2 G2xZFX8KUOGtfNUtRrhV4knyw3WnQLJ8OJa1CSrUOiPgSlg+UiSPKZNHyhnXbBNtcRUs D2R6HP3a6pvVRxBXgvh7DA5HcxUXVTPjvEb0o0fFHhTniwaFAT7nUsNsiRcRdZBw/r9G UzHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rNN641S5wYxqPr30NIP+1NvaKTC27FIX/r/acRV5M5U=; b=GsfZwWZhTF7U83R8c+d6pXlUcmtaDng9cZHV3RdeLhZL/sTD/18IyNnm7c/WmVDYQ6 eLzl4tAoWQPyexRcDQFkEclGx/RfyBSpn0rpCls+sPjn9x+T2uzb2A92ZOgY53kPUCO+ SN4NfEFPi5M8NooEKsenXy8lcrhOHl3MAqjrgskB/4xMpeSqRwHbs7eOcdd+wOUgQIUJ GN75kurHvNhpezM2NWX3wJi75BLj/mYYokf59y5H8+rxtqihDDPRF250VvylSZmY1m1x gtJ1KgwN5dP7/a8chPSaBCKtOT22yPkFiqPL6xgFkHlR8y08hR/6BCSomFVok47NDTVa h2gg== X-Gm-Message-State: AGi0PubtMVrTZ3QaxPv0f5BOqRrFve5k6Z49T9ADjVbdi1mxFi//t7en ujPNfoWoqjnMMXQQ8grmGXTSBQ== X-Google-Smtp-Source: APiQypKWmwJdKhY8G50llqhO74OU7DM0xd3kx4tdluL4XuHSn/X6Iv3Ks+Vy6jLr+L5X5eqb8u3GNg== X-Received: by 2002:a37:9d89:: with SMTP id g131mr13002986qke.166.1585986678254; Sat, 04 Apr 2020 00:51:18 -0700 (PDT) Received: from ?IPv6:2601:c0:c680:5cc0:c473:58c5:1243:37a5? ([2601:c0:c680:5cc0:c473:58c5:1243:37a5]) by smtp.gmail.com with ESMTPSA id q1sm8014782qtn.69.2020.04.04.00.51.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Apr 2020 00:51:17 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: Date: Sat, 4 Apr 2020 03:51:16 -0400 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <48A06F96-14FE-430C-8894-9D8545126522@newclarity.net> References: <5cb01a17-ff6d-b072-30d3-6a891dcc5434@fischer.name> <90a167b7-a848-1a95-9255-862239509283@fischer.name> To: Nikita Popov X-Mailer: Apple Mail (2.3445.104.11) Subject: [PHP-DEV] [RFC] Parse errors w/Constructor Property Promotion? From: mike@newclarity.net (Mike Schinkel) Question: Will parse errors in the __construct() be reported as all = being on the same line, or will the parser report each as a distinct = line of code when reporting parse errors? -Mike > On Apr 2, 2020, at 9:52 AM, Nikita Popov wrote: >=20 > On Thu, Apr 2, 2020 at 3:47 PM Markus Fischer = wrote: >=20 >> Him >>=20 >> On 02.04.20 12:07, Nikita Popov wrote: >>> Reflection will see the state after desugaring. That is, it just = sees >>> normal properties and normal constructor args. I've made this more >> explicit >>> in the RFC now: >> https://wiki.php.net/rfc/constructor_promotion#reflection >>=20 >> Thanks! >>=20 >> Another one, also related a bit to your PHP-Parser (?): will the >> tokenization process "see" the code before desugaring? >>=20 >> I'm wondering how automated translation tool can detect that a = certain >> code is not "sugared" and promote this? >>=20 >=20 > Tokenization and parsing both happen before the desugaring, they see = the > code in its original form. They would detect promoted properties by > checking whether a constructor parameter has a visibility modifier. = Of > course, tooling might want to perform the desugaring transformation > internally, so it sees a uniform representation of everything. >=20 > Regards, > Nikita