{"action":"closed","issue":{"url":"https://api.github.com/repos/Shin-Aska/s2sc.js/issues/19","labels_url":"https://api.github.com/repos/Shin-Aska/s2sc.js/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/Shin-Aska/s2sc.js/issues/19/comments","events_url":"https://api.github.com/repos/Shin-Aska/s2sc.js/issues/19/events","html_url":"https://github.com/Shin-Aska/s2sc.js/issues/19","id":54014720,"number":19,"title":"Loop statements inside functions are not properly generated","user":{"login":"Shin-Aska","id":8596711,"avatar_url":"https://avatars.githubusercontent.com/u/8596711?v=3","gravatar_id":"","url":"https://api.github.com/users/Shin-Aska","html_url":"https://github.com/Shin-Aska","followers_url":"https://api.github.com/users/Shin-Aska/followers","following_url":"https://api.github.com/users/Shin-Aska/following{/other_user}","gists_url":"https://api.github.com/users/Shin-Aska/gists{/gist_id}","starred_url":"https://api.github.com/users/Shin-Aska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shin-Aska/subscriptions","organizations_url":"https://api.github.com/users/Shin-Aska/orgs","repos_url":"https://api.github.com/users/Shin-Aska/repos","events_url":"https://api.github.com/users/Shin-Aska/events{/privacy}","received_events_url":"https://api.github.com/users/Shin-Aska/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Shin-Aska/s2sc.js/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"Shin-Aska","id":8596711,"avatar_url":"https://avatars.githubusercontent.com/u/8596711?v=3","gravatar_id":"","url":"https://api.github.com/users/Shin-Aska","html_url":"https://github.com/Shin-Aska","followers_url":"https://api.github.com/users/Shin-Aska/followers","following_url":"https://api.github.com/users/Shin-Aska/following{/other_user}","gists_url":"https://api.github.com/users/Shin-Aska/gists{/gist_id}","starred_url":"https://api.github.com/users/Shin-Aska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shin-Aska/subscriptions","organizations_url":"https://api.github.com/users/Shin-Aska/orgs","repos_url":"https://api.github.com/users/Shin-Aska/repos","events_url":"https://api.github.com/users/Shin-Aska/events{/privacy}","received_events_url":"https://api.github.com/users/Shin-Aska/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-01-12T02:10:08Z","updated_at":"2015-01-16T01:51:50Z","closed_at":"2015-01-16T01:51:50Z","body":"```Python\r\ndef loopCount(a, b):\r\n\tfor i in range(a, b):\r\n\t\tprint(i)\r\nloopCount(2, 3)\r\n```\r\n\r\nwould end up generating missing parts of the loop structure\r\n\r\n```C\r\n/*******************************************************\r\n\t\tCode generated by s2sc.js\r\n*******************************************************/\r\n\r\n#include <stdlib.h>\r\n#include <gc.h>\r\n#include <math.h>\r\n\r\n#define malloc(n) GC_MALLOC(n)\r\n#define calloc(m,n) GC_MALLOC(m*n)\r\n#define free(p) GC_FREE(p)\r\n#define realloc(n) GC_REALLOC(n)\r\n\r\nint * s2sc_pythonRange (int x, int y) {\r\n\tint rangeSize = abs(x - y);\r\n\tint *list = calloc(rangeSize, sizeof(int));\r\n\tint listIndex = 0;\r\n\tfor (int i = x; i < y; i++, listIndex++) {\r\n\t\tlist[listIndex] = i;\r\n\t}\r\n\treturn list;\r\n}\r\n\r\nvoid loopCount (int a, int b) {\r\n\t}\r\n}\r\n\r\nint main ( void ) {\r\n\r\n\tloopCount(2, 3);\r\n\treturn 0;\r\n}\r\n```"}}