{"action":"closed","issue":{"url":"https://api.github.com/repos/FanGuojie/compile-priciple/issues/11","repository_url":"https://api.github.com/repos/FanGuojie/compile-priciple","labels_url":"https://api.github.com/repos/FanGuojie/compile-priciple/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/FanGuojie/compile-priciple/issues/11/comments","events_url":"https://api.github.com/repos/FanGuojie/compile-priciple/issues/11/events","html_url":"https://github.com/FanGuojie/compile-priciple/issues/11","id":372005605,"node_id":"MDU6SXNzdWUzNzIwMDU2MDU=","number":11,"title":"数组迭代语句","user":{"login":"FanGuojie","id":27681892,"node_id":"MDQ6VXNlcjI3NjgxODky","avatar_url":"https://avatars2.githubusercontent.com/u/27681892?v=4","gravatar_id":"","url":"https://api.github.com/users/FanGuojie","html_url":"https://github.com/FanGuojie","followers_url":"https://api.github.com/users/FanGuojie/followers","following_url":"https://api.github.com/users/FanGuojie/following{/other_user}","gists_url":"https://api.github.com/users/FanGuojie/gists{/gist_id}","starred_url":"https://api.github.com/users/FanGuojie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FanGuojie/subscriptions","organizations_url":"https://api.github.com/users/FanGuojie/orgs","repos_url":"https://api.github.com/users/FanGuojie/repos","events_url":"https://api.github.com/users/FanGuojie/events{/privacy}","received_events_url":"https://api.github.com/users/FanGuojie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-19T15:24:03Z","updated_at":"2018-10-20T02:18:10Z","closed_at":"2018-10-20T02:18:10Z","author_association":"OWNER","body":"数组迭代语句foreach ( var <identifier> in <expr1> while <expr2> ) <stmt>打印为\r\nforeach\r\n    varbind <identifier> var\r\n    <expr1>\r\n    <expr2>\r\n    <stmt>\r\n如果将var替换为Type，那么打印中也要做相应的替换，如果whle <expr2> 省略时，即该条件恒为真，<expr2> 对应的打印为 boolconst true\r\n\r\n如\r\nforeach (var s in ss while s.length() < 10) {\r\n    Print(s);\r\n}\r\n打印为\r\nforeach\r\n    varbind s var\r\n    varref ss\r\n    les\r\n        call length\r\n            varref s\r\n        intconst 10\r\n    stmtblock\r\n        print\r\n            varref s\r\n\r\n参考语法\r\nStmt ::= ForeachStmt |…\r\n\r\nForeachStmt= foreach（BoundVariable in Expr <while BoolExpr>） Stmt\r\nBoundVariable ::= var identifier | Type identifier\r\n"}}
{"actor":{"display_login":"FanGuojie"}}