{"action":"opened","number":62,"pull_request":{"url":"https://api.github.com/repos/sergioramos/jsctags/pulls/62","id":237000329,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MDAwMzI5","html_url":"https://github.com/sergioramos/jsctags/pull/62","diff_url":"https://github.com/sergioramos/jsctags/pull/62.diff","patch_url":"https://github.com/sergioramos/jsctags/pull/62.patch","issue_url":"https://api.github.com/repos/sergioramos/jsctags/issues/62","number":62,"state":"open","locked":false,"title":"parser.js: use lineno() instead of addr()","user":{"login":"romgrk","id":1423607,"node_id":"MDQ6VXNlcjE0MjM2MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/1423607?v=4","gravatar_id":"","url":"https://api.github.com/users/romgrk","html_url":"https://github.com/romgrk","followers_url":"https://api.github.com/users/romgrk/followers","following_url":"https://api.github.com/users/romgrk/following{/other_user}","gists_url":"https://api.github.com/users/romgrk/gists{/gist_id}","starred_url":"https://api.github.com/users/romgrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romgrk/subscriptions","organizations_url":"https://api.github.com/users/romgrk/orgs","repos_url":"https://api.github.com/users/romgrk/repos","events_url":"https://api.github.com/users/romgrk/events{/privacy}","received_events_url":"https://api.github.com/users/romgrk/received_events","type":"User","site_admin":false},"body":"Using `this.addr(node)` sometimes gives wrong results. \r\nFor example:\r\n```js\r\nclass MyClass {\r\n  constructor() {\r\n    this.onClick()\r\n  }\r\n  \r\n  onClick = () => {\r\n    alert('ok')\r\n  }\r\n}\r\n```\r\nOutputs:\r\n```\r\nMyClass\t/home/rgregoir/github/jsctags/test.js\t/MyClass/;\"\tf\tlineno:1\ttype:void function()\r\nprototype\t/home/rgregoir/github/jsctags/test.js\t/class MyClass \\{/;\"\tv\tlineno:1\tnamespace:MyClass\r\nonClick\t/home/rgregoir/github/jsctags/test.js\t/onClick/;\"\tf\tlineno:6\tnamespace:MyClass.prototype\ttype:void function(?)\r\n```\r\n\r\nAs you can see, the Ex command for `onClick` is `/onClick/`. However, that command lands on the first `onClick`, aka `this.onClick()`, which is the wrong position. Using the line number solves that issue, and is also way safer and straight-forward.","created_at":"2018-12-07T21:36:16Z","updated_at":"2018-12-07T21:36:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sergioramos/jsctags/pulls/62/commits","review_comments_url":"https://api.github.com/repos/sergioramos/jsctags/pulls/62/comments","review_comment_url":"https://api.github.com/repos/sergioramos/jsctags/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sergioramos/jsctags/issues/62/comments","statuses_url":"https://api.github.com/repos/sergioramos/jsctags/statuses/03e0cd97bc9fe987c83938e09d14265fa922be45","head":{"label":"romgrk:use-line-number","ref":"use-line-number","sha":"03e0cd97bc9fe987c83938e09d14265fa922be45","user":{"login":"romgrk","id":1423607,"node_id":"MDQ6VXNlcjE0MjM2MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/1423607?v=4","gravatar_id":"","url":"https://api.github.com/users/romgrk","html_url":"https://github.com/romgrk","followers_url":"https://api.github.com/users/romgrk/followers","following_url":"https://api.github.com/users/romgrk/following{/other_user}","gists_url":"https://api.github.com/users/romgrk/gists{/gist_id}","starred_url":"https://api.github.com/users/romgrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romgrk/subscriptions","organizations_url":"https://api.github.com/users/romgrk/orgs","repos_url":"https://api.github.com/users/romgrk/repos","events_url":"https://api.github.com/users/romgrk/events{/privacy}","received_events_url":"https://api.github.com/users/romgrk/received_events","type":"User","site_admin":false},"repo":{"id":160877530,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA4Nzc1MzA=","name":"jsctags","full_name":"romgrk/jsctags","private":false,"owner":{"login":"romgrk","id":1423607,"node_id":"MDQ6VXNlcjE0MjM2MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/1423607?v=4","gravatar_id":"","url":"https://api.github.com/users/romgrk","html_url":"https://github.com/romgrk","followers_url":"https://api.github.com/users/romgrk/followers","following_url":"https://api.github.com/users/romgrk/following{/other_user}","gists_url":"https://api.github.com/users/romgrk/gists{/gist_id}","starred_url":"https://api.github.com/users/romgrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romgrk/subscriptions","organizations_url":"https://api.github.com/users/romgrk/orgs","repos_url":"https://api.github.com/users/romgrk/repos","events_url":"https://api.github.com/users/romgrk/events{/privacy}","received_events_url":"https://api.github.com/users/romgrk/received_events","type":"User","site_admin":false},"html_url":"https://github.com/romgrk/jsctags","description":"jsctags generator using tern","fork":true,"url":"https://api.github.com/repos/romgrk/jsctags","forks_url":"https://api.github.com/repos/romgrk/jsctags/forks","keys_url":"https://api.github.com/repos/romgrk/jsctags/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romgrk/jsctags/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romgrk/jsctags/teams","hooks_url":"https://api.github.com/repos/romgrk/jsctags/hooks","issue_events_url":"https://api.github.com/repos/romgrk/jsctags/issues/events{/number}","events_url":"https://api.github.com/repos/romgrk/jsctags/events","assignees_url":"https://api.github.com/repos/romgrk/jsctags/assignees{/user}","branches_url":"https://api.github.com/repos/romgrk/jsctags/branches{/branch}","tags_url":"https://api.github.com/repos/romgrk/jsctags/tags","blobs_url":"https://api.github.com/repos/romgrk/jsctags/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romgrk/jsctags/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romgrk/jsctags/git/refs{/sha}","trees_url":"https://api.github.com/repos/romgrk/jsctags/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romgrk/jsctags/statuses/{sha}","languages_url":"https://api.github.com/repos/romgrk/jsctags/languages","stargazers_url":"https://api.github.com/repos/romgrk/jsctags/stargazers","contributors_url":"https://api.github.com/repos/romgrk/jsctags/contributors","subscribers_url":"https://api.github.com/repos/romgrk/jsctags/subscribers","subscription_url":"https://api.github.com/repos/romgrk/jsctags/subscription","commits_url":"https://api.github.com/repos/romgrk/jsctags/commits{/sha}","git_commits_url":"https://api.github.com/repos/romgrk/jsctags/git/commits{/sha}","comments_url":"https://api.github.com/repos/romgrk/jsctags/comments{/number}","issue_comment_url":"https://api.github.com/repos/romgrk/jsctags/issues/comments{/number}","contents_url":"https://api.github.com/repos/romgrk/jsctags/contents/{+path}","compare_url":"https://api.github.com/repos/romgrk/jsctags/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romgrk/jsctags/merges","archive_url":"https://api.github.com/repos/romgrk/jsctags/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romgrk/jsctags/downloads","issues_url":"https://api.github.com/repos/romgrk/jsctags/issues{/number}","pulls_url":"https://api.github.com/repos/romgrk/jsctags/pulls{/number}","milestones_url":"https://api.github.com/repos/romgrk/jsctags/milestones{/number}","notifications_url":"https://api.github.com/repos/romgrk/jsctags/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romgrk/jsctags/labels{/name}","releases_url":"https://api.github.com/repos/romgrk/jsctags/releases{/id}","deployments_url":"https://api.github.com/repos/romgrk/jsctags/deployments","created_at":"2018-12-07T21:31:49Z","updated_at":"2018-12-07T21:31:52Z","pushed_at":"2018-12-07T21:32:32Z","git_url":"git://github.com/romgrk/jsctags.git","ssh_url":"git@github.com:romgrk/jsctags.git","clone_url":"https://github.com/romgrk/jsctags.git","svn_url":"https://github.com/romgrk/jsctags","homepage":"","size":616,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sergioramos:master","ref":"master","sha":"22d3fb848c429d4704dc3a8946bc3a4423a8e4a4","user":{"login":"sergioramos","id":501018,"node_id":"MDQ6VXNlcjUwMTAxOA==","avatar_url":"https://avatars1.githubusercontent.com/u/501018?v=4","gravatar_id":"","url":"https://api.github.com/users/sergioramos","html_url":"https://github.com/sergioramos","followers_url":"https://api.github.com/users/sergioramos/followers","following_url":"https://api.github.com/users/sergioramos/following{/other_user}","gists_url":"https://api.github.com/users/sergioramos/gists{/gist_id}","starred_url":"https://api.github.com/users/sergioramos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergioramos/subscriptions","organizations_url":"https://api.github.com/users/sergioramos/orgs","repos_url":"https://api.github.com/users/sergioramos/repos","events_url":"https://api.github.com/users/sergioramos/events{/privacy}","received_events_url":"https://api.github.com/users/sergioramos/received_events","type":"User","site_admin":false},"repo":{"id":10888541,"node_id":"MDEwOlJlcG9zaXRvcnkxMDg4ODU0MQ==","name":"jsctags","full_name":"sergioramos/jsctags","private":false,"owner":{"login":"sergioramos","id":501018,"node_id":"MDQ6VXNlcjUwMTAxOA==","avatar_url":"https://avatars1.githubusercontent.com/u/501018?v=4","gravatar_id":"","url":"https://api.github.com/users/sergioramos","html_url":"https://github.com/sergioramos","followers_url":"https://api.github.com/users/sergioramos/followers","following_url":"https://api.github.com/users/sergioramos/following{/other_user}","gists_url":"https://api.github.com/users/sergioramos/gists{/gist_id}","starred_url":"https://api.github.com/users/sergioramos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergioramos/subscriptions","organizations_url":"https://api.github.com/users/sergioramos/orgs","repos_url":"https://api.github.com/users/sergioramos/repos","events_url":"https://api.github.com/users/sergioramos/events{/privacy}","received_events_url":"https://api.github.com/users/sergioramos/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sergioramos/jsctags","description":"jsctags generator using tern","fork":false,"url":"https://api.github.com/repos/sergioramos/jsctags","forks_url":"https://api.github.com/repos/sergioramos/jsctags/forks","keys_url":"https://api.github.com/repos/sergioramos/jsctags/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sergioramos/jsctags/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sergioramos/jsctags/teams","hooks_url":"https://api.github.com/repos/sergioramos/jsctags/hooks","issue_events_url":"https://api.github.com/repos/sergioramos/jsctags/issues/events{/number}","events_url":"https://api.github.com/repos/sergioramos/jsctags/events","assignees_url":"https://api.github.com/repos/sergioramos/jsctags/assignees{/user}","branches_url":"https://api.github.com/repos/sergioramos/jsctags/branches{/branch}","tags_url":"https://api.github.com/repos/sergioramos/jsctags/tags","blobs_url":"https://api.github.com/repos/sergioramos/jsctags/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sergioramos/jsctags/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sergioramos/jsctags/git/refs{/sha}","trees_url":"https://api.github.com/repos/sergioramos/jsctags/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sergioramos/jsctags/statuses/{sha}","languages_url":"https://api.github.com/repos/sergioramos/jsctags/languages","stargazers_url":"https://api.github.com/repos/sergioramos/jsctags/stargazers","contributors_url":"https://api.github.com/repos/sergioramos/jsctags/contributors","subscribers_url":"https://api.github.com/repos/sergioramos/jsctags/subscribers","subscription_url":"https://api.github.com/repos/sergioramos/jsctags/subscription","commits_url":"https://api.github.com/repos/sergioramos/jsctags/commits{/sha}","git_commits_url":"https://api.github.com/repos/sergioramos/jsctags/git/commits{/sha}","comments_url":"https://api.github.com/repos/sergioramos/jsctags/comments{/number}","issue_comment_url":"https://api.github.com/repos/sergioramos/jsctags/issues/comments{/number}","contents_url":"https://api.github.com/repos/sergioramos/jsctags/contents/{+path}","compare_url":"https://api.github.com/repos/sergioramos/jsctags/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sergioramos/jsctags/merges","archive_url":"https://api.github.com/repos/sergioramos/jsctags/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sergioramos/jsctags/downloads","issues_url":"https://api.github.com/repos/sergioramos/jsctags/issues{/number}","pulls_url":"https://api.github.com/repos/sergioramos/jsctags/pulls{/number}","milestones_url":"https://api.github.com/repos/sergioramos/jsctags/milestones{/number}","notifications_url":"https://api.github.com/repos/sergioramos/jsctags/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sergioramos/jsctags/labels{/name}","releases_url":"https://api.github.com/repos/sergioramos/jsctags/releases{/id}","deployments_url":"https://api.github.com/repos/sergioramos/jsctags/deployments","created_at":"2013-06-23T17:13:12Z","updated_at":"2018-12-05T17:45:38Z","pushed_at":"2018-10-20T19:49:21Z","git_url":"git://github.com/sergioramos/jsctags.git","ssh_url":"git@github.com:sergioramos/jsctags.git","clone_url":"https://github.com/sergioramos/jsctags.git","svn_url":"https://github.com/sergioramos/jsctags","homepage":"","size":616,"stargazers_count":443,"watchers_count":443,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":16,"license":null,"forks":46,"open_issues":16,"watchers":443,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sergioramos/jsctags/pulls/62"},"html":{"href":"https://github.com/sergioramos/jsctags/pull/62"},"issue":{"href":"https://api.github.com/repos/sergioramos/jsctags/issues/62"},"comments":{"href":"https://api.github.com/repos/sergioramos/jsctags/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/sergioramos/jsctags/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/sergioramos/jsctags/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sergioramos/jsctags/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/sergioramos/jsctags/statuses/03e0cd97bc9fe987c83938e09d14265fa922be45"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"romgrk"}}