{"action":"reopened","issue":{"url":"https://api.github.com/repos/gracelang/language/issues/133","repository_url":"https://api.github.com/repos/gracelang/language","labels_url":"https://api.github.com/repos/gracelang/language/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/gracelang/language/issues/133/comments","events_url":"https://api.github.com/repos/gracelang/language/issues/133/events","html_url":"https://github.com/gracelang/language/issues/133","id":275627479,"number":133,"title":"Dialects should built their own AST","user":{"login":"kjx","id":1917107,"avatar_url":"https://avatars3.githubusercontent.com/u/1917107?v=4","gravatar_id":"","url":"https://api.github.com/users/kjx","html_url":"https://github.com/kjx","followers_url":"https://api.github.com/users/kjx/followers","following_url":"https://api.github.com/users/kjx/following{/other_user}","gists_url":"https://api.github.com/users/kjx/gists{/gist_id}","starred_url":"https://api.github.com/users/kjx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjx/subscriptions","organizations_url":"https://api.github.com/users/kjx/orgs","repos_url":"https://api.github.com/users/kjx/repos","events_url":"https://api.github.com/users/kjx/events{/privacy}","received_events_url":"https://api.github.com/users/kjx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-21T08:41:10Z","updated_at":"2018-03-07T19:30:35Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"where should the AST used by dialect checkers come from?  \r\nwhat if some dialect (static type checker) need more information or methods on AST objects,\r\nothers (findbugs?) will need less information, and some (static checker?) would need a crazy amount. \r\n\r\nmy suggestion is that a dialect should be (or should offer) an AST factory (aka Object Algebra) - a suite of methods to build an AST.   When a module using a checker dialect is instantiated, that factory is used to build an AST with the methods on it that that particular checker needs. Something like:\r\n\r\ntype astAlgebra = interface {\r\n   numberLiteral( n ) at ( position )\r\n   stringLiteral( s) at ( position )\r\n   blockLiteral ( parameters ) over ( body ) returning ( type ) at ( position ) \r\n   receiver (rcvr) Request ( name) args (args)  at ( position ) \r\n   implicitRequest (name) args (args) at ( position ) \r\n}\r\n\r\nthe compiler can walk its internal AST and call out to classes in the factory."}}
{"actor":{"display_login":"apblack"}}