{"action":"created","issue":{"url":"https://api.github.com/repos/atomist/rug/issues/83","repository_url":"https://api.github.com/repos/atomist/rug","labels_url":"https://api.github.com/repos/atomist/rug/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/atomist/rug/issues/83/comments","events_url":"https://api.github.com/repos/atomist/rug/issues/83/events","html_url":"https://github.com/atomist/rug/issues/83","id":196385201,"number":83,"title":"Microgrammar support","user":{"login":"kipz","id":1865026,"avatar_url":"https://avatars.githubusercontent.com/u/1865026?v=3","gravatar_id":"","url":"https://api.github.com/users/kipz","html_url":"https://github.com/kipz","followers_url":"https://api.github.com/users/kipz/followers","following_url":"https://api.github.com/users/kipz/following{/other_user}","gists_url":"https://api.github.com/users/kipz/gists{/gist_id}","starred_url":"https://api.github.com/users/kipz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kipz/subscriptions","organizations_url":"https://api.github.com/users/kipz/orgs","repos_url":"https://api.github.com/users/kipz/repos","events_url":"https://api.github.com/users/kipz/events{/privacy}","received_events_url":"https://api.github.com/users/kipz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-19T10:56:56Z","updated_at":"2016-12-19T10:56:56Z","closed_at":null,"body":"_From @johnsonr on November 19, 2016 11:40_\n\nSupport for **microgrammars** is crucial for offering a consistent, extensible search and replace capability that exceeds the power of regular expressions. No such library exists and we must provide it.\r\n\r\nMicrogrammar support should:\r\n\r\n- Not depend on ANTLR or other Java dependencies, in case we want to compile it to JavaScript using Scala.JS\r\n- Be easy to use from both Rug and TypeScript\r\n- Offer a concise, testable and readable syntax that's easy to learn\r\n- Be fully integrated with `TreeNode` hierarchy.\n\n_Copied from original issue: atomist-recycling/rug-lib#100_"},"comment":{"url":"https://api.github.com/repos/atomist/rug/issues/comments/267936848","html_url":"https://github.com/atomist/rug/issues/83#issuecomment-267936848","issue_url":"https://api.github.com/repos/atomist/rug/issues/83","id":267936848,"user":{"login":"kipz","id":1865026,"avatar_url":"https://avatars.githubusercontent.com/u/1865026?v=3","gravatar_id":"","url":"https://api.github.com/users/kipz","html_url":"https://github.com/kipz","followers_url":"https://api.github.com/users/kipz/followers","following_url":"https://api.github.com/users/kipz/following{/other_user}","gists_url":"https://api.github.com/users/kipz/gists{/gist_id}","starred_url":"https://api.github.com/users/kipz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kipz/subscriptions","organizations_url":"https://api.github.com/users/kipz/orgs","repos_url":"https://api.github.com/users/kipz/repos","events_url":"https://api.github.com/users/kipz/events{/privacy}","received_events_url":"https://api.github.com/users/kipz/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T10:56:56Z","updated_at":"2016-12-19T10:56:56Z","body":"_From @johnsonr on November 20, 2016 5:12_\n\nWe should be able to \"type\" microgrammars in TypeScript, along these lines:\n\n```\ninterface Microgrammar<T < TreeNode> {\n\n    definition: string\n\n   withResults(t: T): // return some type of typed tree\n}\n\n\nclass AnnotatedMethod(annotation: string) implements Microgrammar {\n\n    definition() {\n         return `@$${annotation} public $$fieldName`\n   }\n}\n```\n\nNotes:\n- Need to think about the lifecycle, and when the typing approach cuts in\n- Using `$` in microgrammar definitions is probably wrong for a variable reference, as it makes  TypeScript string interpolation confusing\n"}}
{"actor":{"display_login":"kipz"}}