{"action":"opened","issue":{"url":"https://api.github.com/repos/NeowayLabs/nash/issues/121","repository_url":"https://api.github.com/repos/NeowayLabs/nash","labels_url":"https://api.github.com/repos/NeowayLabs/nash/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/NeowayLabs/nash/issues/121/comments","events_url":"https://api.github.com/repos/NeowayLabs/nash/issues/121/events","html_url":"https://github.com/NeowayLabs/nash/issues/121","id":181211965,"number":121,"title":"spec: add support for func invocation in if conditions","user":{"login":"tiago4orion","id":251478,"avatar_url":"https://avatars.githubusercontent.com/u/251478?v=3","gravatar_id":"","url":"https://api.github.com/users/tiago4orion","html_url":"https://github.com/tiago4orion","followers_url":"https://api.github.com/users/tiago4orion/followers","following_url":"https://api.github.com/users/tiago4orion/following{/other_user}","gists_url":"https://api.github.com/users/tiago4orion/gists{/gist_id}","starred_url":"https://api.github.com/users/tiago4orion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiago4orion/subscriptions","organizations_url":"https://api.github.com/users/tiago4orion/orgs","repos_url":"https://api.github.com/users/tiago4orion/repos","events_url":"https://api.github.com/users/tiago4orion/events{/privacy}","received_events_url":"https://api.github.com/users/tiago4orion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T17:05:39Z","updated_at":"2016-10-05T17:05:39Z","closed_at":null,"body":"Currently, the code below:\r\n```sh\r\n\r\nmovie = (hackers 1995)\r\n\r\nif len($movie) != \"0\" {\r\n     dosomething($movie)\r\n}\r\n```\r\n\r\nMust be written as:\r\n\r\n```sh\r\n\r\nmovie = (hackers 1995)\r\nmovielen <= len($movie)\r\n\r\nif $movielen != \"0\" {\r\n        dosomething($movie)\r\n}\r\n```\r\n\r\nbecause lvalue/rvalue of `if clause` must be values.\r\n\r\nThe new spec for `if` should be:\r\n\r\n```\r\n/* If-else-if */\r\nifDecl = \"if\" ( varValue | fnInv ) comparison\r\n              ( varValue | fnInv) \"{\" program \"}\"\r\n         [ \"else\" \"{\" program \"}\" ]\r\n         [ \"else\" ifDecl ] .\r\n```"}}
{"actor":{"display_login":"tiago4orion"}}