{"action":"created","comment":{"url":"https://api.github.com/repos/storyscript/storyscript/pulls/comments/308725919","pull_request_review_id":268397429,"id":308725919,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwODcyNTkxOQ==","diff_hunk":"@@ -450,13 +450,34 @@ def visit_assignment(self, node, block, parent):\n                     new_line = block.line()\n                     n.expect(len(n.children) == 1,\n                              'object_destructoring_invalid_path')\n-                    name = n.child(0)\n+\n+                    # We need to create copy of this token since we don't want\n+                    # it to be convoluted with the path token.\n+                    name = Tree.create_token_from_tok(\n+                        n.child(0),\n+                        'NAME',\n+                        n.child(0).value\n+                    )\n                     name.line = new_line  # update token's line info\n+                    # Update the line number for the original path token\n+                    n.child(0).line = new_line\n+\n+                    # The original path token should have a line number same as\n+                    # the rest of the token's in the tree. Therefore we\n+                    # generate a new token and update it's line number.\n+                    path_tok = Tree.create_token_from_tok(\n+                        orig_obj.child(0),\n+                        'NAME',\n+                        orig_obj.child(0).value\n+                    )","path":"storyscript/compiler/lowering/Lowering.py","position":24,"original_position":24,"commit_id":"eb9d05f7b490f711135834057b3c4319f8e7a48e","original_commit_id":"eb9d05f7b490f711135834057b3c4319f8e7a48e","user":{"login":"wilzbach","id":4370550,"node_id":"MDQ6VXNlcjQzNzA1NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/4370550?v=4","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"body":"> Here we're talking about (b) which are unique. \r\n\r\nAh noticed that here's we're actually talking about `path` which is (a). Sorry about the confusion.","created_at":"2019-07-30T13:38:58Z","updated_at":"2019-07-30T13:38:59Z","html_url":"https://github.com/storyscript/storyscript/pull/1042#discussion_r308725919","pull_request_url":"https://api.github.com/repos/storyscript/storyscript/pulls/1042","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/storyscript/storyscript/pulls/comments/308725919"},"html":{"href":"https://github.com/storyscript/storyscript/pull/1042#discussion_r308725919"},"pull_request":{"href":"https://api.github.com/repos/storyscript/storyscript/pulls/1042"}},"in_reply_to_id":308299458},"pull_request":{"url":"https://api.github.com/repos/storyscript/storyscript/pulls/1042","id":301012587,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAxMDEyNTg3","html_url":"https://github.com/storyscript/storyscript/pull/1042","diff_url":"https://github.com/storyscript/storyscript/pull/1042.diff","patch_url":"https://github.com/storyscript/storyscript/pull/1042.patch","issue_url":"https://api.github.com/repos/storyscript/storyscript/issues/1042","number":1042,"state":"open","locked":false,"title":"feat(compiler): support expressions in list and object index","user":{"login":"adnrs96","id":17237412,"node_id":"MDQ6VXNlcjE3MjM3NDEy","avatar_url":"https://avatars3.githubusercontent.com/u/17237412?v=4","gravatar_id":"","url":"https://api.github.com/users/adnrs96","html_url":"https://github.com/adnrs96","followers_url":"https://api.github.com/users/adnrs96/followers","following_url":"https://api.github.com/users/adnrs96/following{/other_user}","gists_url":"https://api.github.com/users/adnrs96/gists{/gist_id}","starred_url":"https://api.github.com/users/adnrs96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adnrs96/subscriptions","organizations_url":"https://api.github.com/users/adnrs96/orgs","repos_url":"https://api.github.com/users/adnrs96/repos","events_url":"https://api.github.com/users/adnrs96/events{/privacy}","received_events_url":"https://api.github.com/users/adnrs96/received_events","type":"User","site_admin":false},"body":"**- What I did**\r\nIn this commit we start supporting expressions in the list or\r\nobject index.\r\n\r\n**- How I did it**\r\nWe do this by modifying grammar to accept expressions as list or\r\nan object index and work on path resolution code path to interpret\r\nthese expressions and spit out correct resolved types.\r\n\r\n**- How to verify it**\r\nThis means following syntax is now supported:\r\nExamples:\r\n\t\ta[2 + 2]\r\n\t\ta[\"foo\" + \"bar\"]\r\n\r\nCloses: #559.","created_at":"2019-07-25T07:15:19Z","updated_at":"2019-07-30T13:38:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"981645c3bfa297569f9f7d2d9da00c8456eb6970","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/storyscript/storyscript/pulls/1042/commits","review_comments_url":"https://api.github.com/repos/storyscript/storyscript/pulls/1042/comments","review_comment_url":"https://api.github.com/repos/storyscript/storyscript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/storyscript/storyscript/issues/1042/comments","statuses_url":"https://api.github.com/repos/storyscript/storyscript/statuses/eb9d05f7b490f711135834057b3c4319f8e7a48e","head":{"label":"adnrs96:fix-559","ref":"fix-559","sha":"eb9d05f7b490f711135834057b3c4319f8e7a48e","user":{"login":"adnrs96","id":17237412,"node_id":"MDQ6VXNlcjE3MjM3NDEy","avatar_url":"https://avatars3.githubusercontent.com/u/17237412?v=4","gravatar_id":"","url":"https://api.github.com/users/adnrs96","html_url":"https://github.com/adnrs96","followers_url":"https://api.github.com/users/adnrs96/followers","following_url":"https://api.github.com/users/adnrs96/following{/other_user}","gists_url":"https://api.github.com/users/adnrs96/gists{/gist_id}","starred_url":"https://api.github.com/users/adnrs96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adnrs96/subscriptions","organizations_url":"https://api.github.com/users/adnrs96/orgs","repos_url":"https://api.github.com/users/adnrs96/repos","events_url":"https://api.github.com/users/adnrs96/events{/privacy}","received_events_url":"https://api.github.com/users/adnrs96/received_events","type":"User","site_admin":false},"repo":{"id":196349745,"node_id":"MDEwOlJlcG9zaXRvcnkxOTYzNDk3NDU=","name":"storyscript","full_name":"adnrs96/storyscript","private":false,"owner":{"login":"adnrs96","id":17237412,"node_id":"MDQ6VXNlcjE3MjM3NDEy","avatar_url":"https://avatars3.githubusercontent.com/u/17237412?v=4","gravatar_id":"","url":"https://api.github.com/users/adnrs96","html_url":"https://github.com/adnrs96","followers_url":"https://api.github.com/users/adnrs96/followers","following_url":"https://api.github.com/users/adnrs96/following{/other_user}","gists_url":"https://api.github.com/users/adnrs96/gists{/gist_id}","starred_url":"https://api.github.com/users/adnrs96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adnrs96/subscriptions","organizations_url":"https://api.github.com/users/adnrs96/orgs","repos_url":"https://api.github.com/users/adnrs96/repos","events_url":"https://api.github.com/users/adnrs96/events{/privacy}","received_events_url":"https://api.github.com/users/adnrs96/received_events","type":"User","site_admin":false},"html_url":"https://github.com/adnrs96/storyscript","description":"The polyglot, cloud-native programming language for zero-devops deployments into Kubernetes.","fork":true,"url":"https://api.github.com/repos/adnrs96/storyscript","forks_url":"https://api.github.com/repos/adnrs96/storyscript/forks","keys_url":"https://api.github.com/repos/adnrs96/storyscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adnrs96/storyscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adnrs96/storyscript/teams","hooks_url":"https://api.github.com/repos/adnrs96/storyscript/hooks","issue_events_url":"https://api.github.com/repos/adnrs96/storyscript/issues/events{/number}","events_url":"https://api.github.com/repos/adnrs96/storyscript/events","assignees_url":"https://api.github.com/repos/adnrs96/storyscript/assignees{/user}","branches_url":"https://api.github.com/repos/adnrs96/storyscript/branches{/branch}","tags_url":"https://api.github.com/repos/adnrs96/storyscript/tags","blobs_url":"https://api.github.com/repos/adnrs96/storyscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adnrs96/storyscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adnrs96/storyscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/adnrs96/storyscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adnrs96/storyscript/statuses/{sha}","languages_url":"https://api.github.com/repos/adnrs96/storyscript/languages","stargazers_url":"https://api.github.com/repos/adnrs96/storyscript/stargazers","contributors_url":"https://api.github.com/repos/adnrs96/storyscript/contributors","subscribers_url":"https://api.github.com/repos/adnrs96/storyscript/subscribers","subscription_url":"https://api.github.com/repos/adnrs96/storyscript/subscription","commits_url":"https://api.github.com/repos/adnrs96/storyscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/adnrs96/storyscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/adnrs96/storyscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/adnrs96/storyscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/adnrs96/storyscript/contents/{+path}","compare_url":"https://api.github.com/repos/adnrs96/storyscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adnrs96/storyscript/merges","archive_url":"https://api.github.com/repos/adnrs96/storyscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adnrs96/storyscript/downloads","issues_url":"https://api.github.com/repos/adnrs96/storyscript/issues{/number}","pulls_url":"https://api.github.com/repos/adnrs96/storyscript/pulls{/number}","milestones_url":"https://api.github.com/repos/adnrs96/storyscript/milestones{/number}","notifications_url":"https://api.github.com/repos/adnrs96/storyscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adnrs96/storyscript/labels{/name}","releases_url":"https://api.github.com/repos/adnrs96/storyscript/releases{/id}","deployments_url":"https://api.github.com/repos/adnrs96/storyscript/deployments","created_at":"2019-07-11T08:11:36Z","updated_at":"2019-07-11T08:11:39Z","pushed_at":"2019-07-29T13:47:45Z","git_url":"git://github.com/adnrs96/storyscript.git","ssh_url":"git@github.com:adnrs96/storyscript.git","clone_url":"https://github.com/adnrs96/storyscript.git","svn_url":"https://github.com/adnrs96/storyscript","homepage":"http://storyscript.io","size":3159,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"storyscript:master","ref":"master","sha":"c73d3466b0b7f6c4766949282d73725619c37a19","user":{"login":"storyscript","id":34162468,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MTYyNDY4","avatar_url":"https://avatars0.githubusercontent.com/u/34162468?v=4","gravatar_id":"","url":"https://api.github.com/users/storyscript","html_url":"https://github.com/storyscript","followers_url":"https://api.github.com/users/storyscript/followers","following_url":"https://api.github.com/users/storyscript/following{/other_user}","gists_url":"https://api.github.com/users/storyscript/gists{/gist_id}","starred_url":"https://api.github.com/users/storyscript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storyscript/subscriptions","organizations_url":"https://api.github.com/users/storyscript/orgs","repos_url":"https://api.github.com/users/storyscript/repos","events_url":"https://api.github.com/users/storyscript/events{/privacy}","received_events_url":"https://api.github.com/users/storyscript/received_events","type":"Organization","site_admin":false},"repo":{"id":112904544,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI5MDQ1NDQ=","name":"storyscript","full_name":"storyscript/storyscript","private":false,"owner":{"login":"storyscript","id":34162468,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MTYyNDY4","avatar_url":"https://avatars0.githubusercontent.com/u/34162468?v=4","gravatar_id":"","url":"https://api.github.com/users/storyscript","html_url":"https://github.com/storyscript","followers_url":"https://api.github.com/users/storyscript/followers","following_url":"https://api.github.com/users/storyscript/following{/other_user}","gists_url":"https://api.github.com/users/storyscript/gists{/gist_id}","starred_url":"https://api.github.com/users/storyscript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storyscript/subscriptions","organizations_url":"https://api.github.com/users/storyscript/orgs","repos_url":"https://api.github.com/users/storyscript/repos","events_url":"https://api.github.com/users/storyscript/events{/privacy}","received_events_url":"https://api.github.com/users/storyscript/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/storyscript/storyscript","description":"The polyglot, cloud-native programming language for zero-devops deployments into Kubernetes.","fork":false,"url":"https://api.github.com/repos/storyscript/storyscript","forks_url":"https://api.github.com/repos/storyscript/storyscript/forks","keys_url":"https://api.github.com/repos/storyscript/storyscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storyscript/storyscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storyscript/storyscript/teams","hooks_url":"https://api.github.com/repos/storyscript/storyscript/hooks","issue_events_url":"https://api.github.com/repos/storyscript/storyscript/issues/events{/number}","events_url":"https://api.github.com/repos/storyscript/storyscript/events","assignees_url":"https://api.github.com/repos/storyscript/storyscript/assignees{/user}","branches_url":"https://api.github.com/repos/storyscript/storyscript/branches{/branch}","tags_url":"https://api.github.com/repos/storyscript/storyscript/tags","blobs_url":"https://api.github.com/repos/storyscript/storyscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storyscript/storyscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storyscript/storyscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/storyscript/storyscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storyscript/storyscript/statuses/{sha}","languages_url":"https://api.github.com/repos/storyscript/storyscript/languages","stargazers_url":"https://api.github.com/repos/storyscript/storyscript/stargazers","contributors_url":"https://api.github.com/repos/storyscript/storyscript/contributors","subscribers_url":"https://api.github.com/repos/storyscript/storyscript/subscribers","subscription_url":"https://api.github.com/repos/storyscript/storyscript/subscription","commits_url":"https://api.github.com/repos/storyscript/storyscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/storyscript/storyscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/storyscript/storyscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/storyscript/storyscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/storyscript/storyscript/contents/{+path}","compare_url":"https://api.github.com/repos/storyscript/storyscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storyscript/storyscript/merges","archive_url":"https://api.github.com/repos/storyscript/storyscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storyscript/storyscript/downloads","issues_url":"https://api.github.com/repos/storyscript/storyscript/issues{/number}","pulls_url":"https://api.github.com/repos/storyscript/storyscript/pulls{/number}","milestones_url":"https://api.github.com/repos/storyscript/storyscript/milestones{/number}","notifications_url":"https://api.github.com/repos/storyscript/storyscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storyscript/storyscript/labels{/name}","releases_url":"https://api.github.com/repos/storyscript/storyscript/releases{/id}","deployments_url":"https://api.github.com/repos/storyscript/storyscript/deployments","created_at":"2017-12-03T06:05:21Z","updated_at":"2019-07-29T15:13:29Z","pushed_at":"2019-07-29T13:47:47Z","git_url":"git://github.com/storyscript/storyscript.git","ssh_url":"git@github.com:storyscript/storyscript.git","clone_url":"https://github.com/storyscript/storyscript.git","svn_url":"https://github.com/storyscript/storyscript","homepage":"http://storyscript.io","size":3135,"stargazers_count":283,"watchers_count":283,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":32,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":148,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":32,"open_issues":148,"watchers":283,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/storyscript/storyscript/pulls/1042"},"html":{"href":"https://github.com/storyscript/storyscript/pull/1042"},"issue":{"href":"https://api.github.com/repos/storyscript/storyscript/issues/1042"},"comments":{"href":"https://api.github.com/repos/storyscript/storyscript/issues/1042/comments"},"review_comments":{"href":"https://api.github.com/repos/storyscript/storyscript/pulls/1042/comments"},"review_comment":{"href":"https://api.github.com/repos/storyscript/storyscript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/storyscript/storyscript/pulls/1042/commits"},"statuses":{"href":"https://api.github.com/repos/storyscript/storyscript/statuses/eb9d05f7b490f711135834057b3c4319f8e7a48e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wilzbach"}}