{"action":"created","issue":{"url":"https://api.github.com/repos/glayzzle/php-parser/issues/188","repository_url":"https://api.github.com/repos/glayzzle/php-parser","labels_url":"https://api.github.com/repos/glayzzle/php-parser/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/glayzzle/php-parser/issues/188/comments","events_url":"https://api.github.com/repos/glayzzle/php-parser/issues/188/events","html_url":"https://github.com/glayzzle/php-parser/issues/188","id":362664637,"node_id":"MDU6SXNzdWUzNjI2NjQ2Mzc=","number":188,"title":"[discussion] `constref` vs `identifier`","user":{"login":"evilebottnawi","id":4567934,"node_id":"MDQ6VXNlcjQ1Njc5MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4567934?v=4","gravatar_id":"","url":"https://api.github.com/users/evilebottnawi","html_url":"https://github.com/evilebottnawi","followers_url":"https://api.github.com/users/evilebottnawi/followers","following_url":"https://api.github.com/users/evilebottnawi/following{/other_user}","gists_url":"https://api.github.com/users/evilebottnawi/gists{/gist_id}","starred_url":"https://api.github.com/users/evilebottnawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilebottnawi/subscriptions","organizations_url":"https://api.github.com/users/evilebottnawi/orgs","repos_url":"https://api.github.com/users/evilebottnawi/repos","events_url":"https://api.github.com/users/evilebottnawi/events{/privacy}","received_events_url":"https://api.github.com/users/evilebottnawi/received_events","type":"User","site_admin":false},"labels":[{"id":509957486,"node_id":"MDU6TGFiZWw1MDk5NTc0ODY=","url":"https://api.github.com/repos/glayzzle/php-parser/labels/AST","name":"AST","color":"c5def5","default":false},{"id":509957522,"node_id":"MDU6TGFiZWw1MDk5NTc1MjI=","url":"https://api.github.com/repos/glayzzle/php-parser/labels/PARSER","name":"PARSER","color":"c5def5","default":false},{"id":155056625,"node_id":"MDU6TGFiZWwxNTUwNTY2MjU=","url":"https://api.github.com/repos/glayzzle/php-parser/labels/enhancement","name":"enhancement","color":"c2e0c6","default":true},{"id":1074580325,"node_id":"MDU6TGFiZWwxMDc0NTgwMzI1","url":"https://api.github.com/repos/glayzzle/php-parser/labels/high-pri","name":"high-pri","color":"e20214","default":false}],"state":"open","locked":false,"assignee":{"login":"ichiriac","id":173203,"node_id":"MDQ6VXNlcjE3MzIwMw==","avatar_url":"https://avatars2.githubusercontent.com/u/173203?v=4","gravatar_id":"","url":"https://api.github.com/users/ichiriac","html_url":"https://github.com/ichiriac","followers_url":"https://api.github.com/users/ichiriac/followers","following_url":"https://api.github.com/users/ichiriac/following{/other_user}","gists_url":"https://api.github.com/users/ichiriac/gists{/gist_id}","starred_url":"https://api.github.com/users/ichiriac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ichiriac/subscriptions","organizations_url":"https://api.github.com/users/ichiriac/orgs","repos_url":"https://api.github.com/users/ichiriac/repos","events_url":"https://api.github.com/users/ichiriac/events{/privacy}","received_events_url":"https://api.github.com/users/ichiriac/received_events","type":"User","site_admin":false},"assignees":[{"login":"ichiriac","id":173203,"node_id":"MDQ6VXNlcjE3MzIwMw==","avatar_url":"https://avatars2.githubusercontent.com/u/173203?v=4","gravatar_id":"","url":"https://api.github.com/users/ichiriac","html_url":"https://github.com/ichiriac","followers_url":"https://api.github.com/users/ichiriac/followers","following_url":"https://api.github.com/users/ichiriac/following{/other_user}","gists_url":"https://api.github.com/users/ichiriac/gists{/gist_id}","starred_url":"https://api.github.com/users/ichiriac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ichiriac/subscriptions","organizations_url":"https://api.github.com/users/ichiriac/orgs","repos_url":"https://api.github.com/users/ichiriac/repos","events_url":"https://api.github.com/users/ichiriac/events{/privacy}","received_events_url":"https://api.github.com/users/ichiriac/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-09-21T15:22:42Z","updated_at":"2018-10-07T19:02:56Z","closed_at":null,"author_association":"NONE","body":"Maybe we can avoid `constref` node and use `identifier` everywhere. Looks babylon do this, also it is more generic. It is remove unnecessary ast node.\r\n\r\nMaybe related to https://github.com/glayzzle/php-parser/issues/183. I think better for `self`, `parent` and `static` use `identifier`.\r\n\r\nAlso related https://github.com/glayzzle/php-parser/issues/113."},"comment":{"url":"https://api.github.com/repos/glayzzle/php-parser/issues/comments/427677983","html_url":"https://github.com/glayzzle/php-parser/issues/188#issuecomment-427677983","issue_url":"https://api.github.com/repos/glayzzle/php-parser/issues/188","id":427677983,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzY3Nzk4Mw==","user":{"login":"ichiriac","id":173203,"node_id":"MDQ6VXNlcjE3MzIwMw==","avatar_url":"https://avatars2.githubusercontent.com/u/173203?v=4","gravatar_id":"","url":"https://api.github.com/users/ichiriac","html_url":"https://github.com/ichiriac","followers_url":"https://api.github.com/users/ichiriac/followers","following_url":"https://api.github.com/users/ichiriac/following{/other_user}","gists_url":"https://api.github.com/users/ichiriac/gists{/gist_id}","starred_url":"https://api.github.com/users/ichiriac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ichiriac/subscriptions","organizations_url":"https://api.github.com/users/ichiriac/orgs","repos_url":"https://api.github.com/users/ichiriac/repos","events_url":"https://api.github.com/users/ichiriac/events{/privacy}","received_events_url":"https://api.github.com/users/ichiriac/received_events","type":"User","site_admin":false},"created_at":"2018-10-07T19:02:56Z","updated_at":"2018-10-07T19:02:56Z","author_association":"MEMBER","body":"I'm not totally agree with php-parser choices; mixing keywords and class names with the identifier node it's not clear - it provides a isSpecialClassName boolean in order to keep the distinction.\r\n\r\nThe babylon choice is to create a special node for each keyword :\r\n![image](https://user-images.githubusercontent.com/173203/46585432-15c2c000-ca71-11e8-9b08-adb458dd2f43.png)\r\n\r\nIt's better, but it's maybe too much. To make it simpler, here some use cases :\r\n\r\n- using a class, function, constant name (actually identifier) ==> becomes a new node like Reference\r\n- a special keyword (static, self, parent...) ==> becomes a new node like Keyword\r\n- a property name (actually constref) ===> becomes Identifier\r\n- a function,  declaration name ===> becomes Identifier\r\n\r\nI want to distinguish Identifier and Reference because of namespace resolution property, and the Reference is a special use case (it refers to a declared structure)\r\n\r\nWhat's your opinion @evilebottnawi ?"}}
{"actor":{"display_login":"ichiriac"}}