{"action":"created","comment":{"url":"https://api.github.com/repos/dart-lang/code_builder/pulls/comments/79218324","id":79218324,"diff_hunk":"@@ -5,79 +5,96 @@\n part of code_builder;\n \n /// Builds a [ClassDeclaration] AST.\n-class ClassBuilder extends _AbstractCodeBuilder<ClassDeclaration> {\n+class ClassBuilder implements CodeBuilder<ClassDeclaration> {\n   static Token _abstract = new KeywordToken(Keyword.ABSTRACT, 0);\n   static Token _extends = new KeywordToken(Keyword.EXTENDS, 0);\n   static Token _implements = new KeywordToken(Keyword.IMPLEMENTS, 0);\n   static Token _with = new KeywordToken(Keyword.WITH, 0);\n \n+  final String _name;\n+  final bool _isAbstract;\n+  final TypeBuilder _extend;\n+  final Iterable<TypeBuilder> _implement;\n+  final Iterable<TypeBuilder> _mixin;\n+\n+  final List<FieldBuilder> _fields = <FieldBuilder>[];\n+  final List<MethodBuilder> _methods = <MethodBuilder>[];\n+  final List<AnnotationBuilder> _metadata = <AnnotationBuilder>[];\n+  final List<ConstructorBuilder> _constructors = <ConstructorBuilder>[];\n+\n   /// Create a new builder for a `class` named [name].\n   ///\n   /// Optionally, define another class to [extend] or classes to either\n   /// [implement] or [mixin]. You may also define a `class` as [abstract].\n   factory ClassBuilder(\n     String name, {\n     bool abstract: false,\n-    String extend,\n-    Iterable<String> implement: const [],\n-    Iterable<String> mixin: const [],\n-  }) {\n-    var astNode = _emptyClassDeclaration()..name = _stringId(name);\n-    if (abstract) {\n-      astNode.abstractKeyword = _abstract;\n-    }\n-    if (extend != null) {\n-      astNode.extendsClause = new ExtendsClause(\n-          _extends,\n-          new TypeName(\n-            _stringId(extend),\n-            null,\n-          ));\n-    }\n-    if (implement.isNotEmpty) {\n-      astNode.implementsClause = new ImplementsClause(\n-          _implements,\n-          implement\n-              .map/*<TypeName>*/((i) => new TypeName(_stringId(i), null))\n-              .toList());\n-    }\n-    if (mixin.isNotEmpty) {\n-      astNode.withClause = new WithClause(\n-          _with,\n-          mixin\n-              .map/*<TypeName>*/((i) => new TypeName(_stringId(i), null))\n-              .toList());\n-    }\n-    return new ClassBuilder._(astNode);\n-  }\n+    TypeBuilder extend,\n+    Iterable<TypeBuilder> implement: const [],\n+    Iterable<TypeBuilder> mixin: const [],\n+  }) =>\n+      new ClassBuilder._(\n+        name,\n+        abstract,","path":"lib/src/builders/class_builder.dart","position":67,"original_position":67,"commit_id":"5760c97bd8c45fdd5e06dc7ffe479e15a911a658","original_commit_id":"5760c97bd8c45fdd5e06dc7ffe479e15a911a658","user":{"login":"matanlurey","id":168174,"avatar_url":"https://avatars.githubusercontent.com/u/168174?v=3","gravatar_id":"","url":"https://api.github.com/users/matanlurey","html_url":"https://github.com/matanlurey","followers_url":"https://api.github.com/users/matanlurey/followers","following_url":"https://api.github.com/users/matanlurey/following{/other_user}","gists_url":"https://api.github.com/users/matanlurey/gists{/gist_id}","starred_url":"https://api.github.com/users/matanlurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanlurey/subscriptions","organizations_url":"https://api.github.com/users/matanlurey/orgs","repos_url":"https://api.github.com/users/matanlurey/repos","events_url":"https://api.github.com/users/matanlurey/events{/privacy}","received_events_url":"https://api.github.com/users/matanlurey/received_events","type":"User","site_admin":false},"body":"Done.\r\n\r\nSplit off to ClassBuilder.asAbstract(...)","created_at":"2016-09-16T17:49:37Z","updated_at":"2016-09-16T17:49:38Z","html_url":"https://github.com/dart-lang/code_builder/pull/11#discussion_r79218324","pull_request_url":"https://api.github.com/repos/dart-lang/code_builder/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/code_builder/pulls/comments/79218324"},"html":{"href":"https://github.com/dart-lang/code_builder/pull/11#discussion_r79218324"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/code_builder/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/dart-lang/code_builder/pulls/11","id":85517051,"html_url":"https://github.com/dart-lang/code_builder/pull/11","diff_url":"https://github.com/dart-lang/code_builder/pull/11.diff","patch_url":"https://github.com/dart-lang/code_builder/pull/11.patch","issue_url":"https://api.github.com/repos/dart-lang/code_builder/issues/11","number":11,"state":"open","locked":false,"title":"Add full scoping support for Library","user":{"login":"matanlurey","id":168174,"avatar_url":"https://avatars.githubusercontent.com/u/168174?v=3","gravatar_id":"","url":"https://api.github.com/users/matanlurey","html_url":"https://github.com/matanlurey","followers_url":"https://api.github.com/users/matanlurey/followers","following_url":"https://api.github.com/users/matanlurey/following{/other_user}","gists_url":"https://api.github.com/users/matanlurey/gists{/gist_id}","starred_url":"https://api.github.com/users/matanlurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanlurey/subscriptions","organizations_url":"https://api.github.com/users/matanlurey/orgs","repos_url":"https://api.github.com/users/matanlurey/repos","events_url":"https://api.github.com/users/matanlurey/events{/privacy}","received_events_url":"https://api.github.com/users/matanlurey/received_events","type":"User","site_admin":false},"body":"Also ran dartfmt and organized members by name in classes so the diff is much larger than it actually is (sorry about that). Added more tests for when a `Scope` is used.","created_at":"2016-09-16T04:20:40Z","updated_at":"2016-09-16T17:49:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ad29d3b95d8d94092845f3ccdc116103de4d496","assignee":{"login":"yjbanov","id":211513,"avatar_url":"https://avatars.githubusercontent.com/u/211513?v=3","gravatar_id":"","url":"https://api.github.com/users/yjbanov","html_url":"https://github.com/yjbanov","followers_url":"https://api.github.com/users/yjbanov/followers","following_url":"https://api.github.com/users/yjbanov/following{/other_user}","gists_url":"https://api.github.com/users/yjbanov/gists{/gist_id}","starred_url":"https://api.github.com/users/yjbanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjbanov/subscriptions","organizations_url":"https://api.github.com/users/yjbanov/orgs","repos_url":"https://api.github.com/users/yjbanov/repos","events_url":"https://api.github.com/users/yjbanov/events{/privacy}","received_events_url":"https://api.github.com/users/yjbanov/received_events","type":"User","site_admin":false},"assignees":[{"login":"yjbanov","id":211513,"avatar_url":"https://avatars.githubusercontent.com/u/211513?v=3","gravatar_id":"","url":"https://api.github.com/users/yjbanov","html_url":"https://github.com/yjbanov","followers_url":"https://api.github.com/users/yjbanov/followers","following_url":"https://api.github.com/users/yjbanov/following{/other_user}","gists_url":"https://api.github.com/users/yjbanov/gists{/gist_id}","starred_url":"https://api.github.com/users/yjbanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjbanov/subscriptions","organizations_url":"https://api.github.com/users/yjbanov/orgs","repos_url":"https://api.github.com/users/yjbanov/repos","events_url":"https://api.github.com/users/yjbanov/events{/privacy}","received_events_url":"https://api.github.com/users/yjbanov/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dart-lang/code_builder/pulls/11/commits","review_comments_url":"https://api.github.com/repos/dart-lang/code_builder/pulls/11/comments","review_comment_url":"https://api.github.com/repos/dart-lang/code_builder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dart-lang/code_builder/issues/11/comments","statuses_url":"https://api.github.com/repos/dart-lang/code_builder/statuses/5760c97bd8c45fdd5e06dc7ffe479e15a911a658","head":{"label":"matanlurey:full_scope","ref":"full_scope","sha":"5760c97bd8c45fdd5e06dc7ffe479e15a911a658","user":{"login":"matanlurey","id":168174,"avatar_url":"https://avatars.githubusercontent.com/u/168174?v=3","gravatar_id":"","url":"https://api.github.com/users/matanlurey","html_url":"https://github.com/matanlurey","followers_url":"https://api.github.com/users/matanlurey/followers","following_url":"https://api.github.com/users/matanlurey/following{/other_user}","gists_url":"https://api.github.com/users/matanlurey/gists{/gist_id}","starred_url":"https://api.github.com/users/matanlurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanlurey/subscriptions","organizations_url":"https://api.github.com/users/matanlurey/orgs","repos_url":"https://api.github.com/users/matanlurey/repos","events_url":"https://api.github.com/users/matanlurey/events{/privacy}","received_events_url":"https://api.github.com/users/matanlurey/received_events","type":"User","site_admin":false},"repo":{"id":68159053,"name":"code_builder","full_name":"matanlurey/code_builder","owner":{"login":"matanlurey","id":168174,"avatar_url":"https://avatars.githubusercontent.com/u/168174?v=3","gravatar_id":"","url":"https://api.github.com/users/matanlurey","html_url":"https://github.com/matanlurey","followers_url":"https://api.github.com/users/matanlurey/followers","following_url":"https://api.github.com/users/matanlurey/following{/other_user}","gists_url":"https://api.github.com/users/matanlurey/gists{/gist_id}","starred_url":"https://api.github.com/users/matanlurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanlurey/subscriptions","organizations_url":"https://api.github.com/users/matanlurey/orgs","repos_url":"https://api.github.com/users/matanlurey/repos","events_url":"https://api.github.com/users/matanlurey/events{/privacy}","received_events_url":"https://api.github.com/users/matanlurey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matanlurey/code_builder","description":"A fluent API for generating valid Dart source code","fork":true,"url":"https://api.github.com/repos/matanlurey/code_builder","forks_url":"https://api.github.com/repos/matanlurey/code_builder/forks","keys_url":"https://api.github.com/repos/matanlurey/code_builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matanlurey/code_builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matanlurey/code_builder/teams","hooks_url":"https://api.github.com/repos/matanlurey/code_builder/hooks","issue_events_url":"https://api.github.com/repos/matanlurey/code_builder/issues/events{/number}","events_url":"https://api.github.com/repos/matanlurey/code_builder/events","assignees_url":"https://api.github.com/repos/matanlurey/code_builder/assignees{/user}","branches_url":"https://api.github.com/repos/matanlurey/code_builder/branches{/branch}","tags_url":"https://api.github.com/repos/matanlurey/code_builder/tags","blobs_url":"https://api.github.com/repos/matanlurey/code_builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matanlurey/code_builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matanlurey/code_builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/matanlurey/code_builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matanlurey/code_builder/statuses/{sha}","languages_url":"https://api.github.com/repos/matanlurey/code_builder/languages","stargazers_url":"https://api.github.com/repos/matanlurey/code_builder/stargazers","contributors_url":"https://api.github.com/repos/matanlurey/code_builder/contributors","subscribers_url":"https://api.github.com/repos/matanlurey/code_builder/subscribers","subscription_url":"https://api.github.com/repos/matanlurey/code_builder/subscription","commits_url":"https://api.github.com/repos/matanlurey/code_builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/matanlurey/code_builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/matanlurey/code_builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/matanlurey/code_builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/matanlurey/code_builder/contents/{+path}","compare_url":"https://api.github.com/repos/matanlurey/code_builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matanlurey/code_builder/merges","archive_url":"https://api.github.com/repos/matanlurey/code_builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matanlurey/code_builder/downloads","issues_url":"https://api.github.com/repos/matanlurey/code_builder/issues{/number}","pulls_url":"https://api.github.com/repos/matanlurey/code_builder/pulls{/number}","milestones_url":"https://api.github.com/repos/matanlurey/code_builder/milestones{/number}","notifications_url":"https://api.github.com/repos/matanlurey/code_builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matanlurey/code_builder/labels{/name}","releases_url":"https://api.github.com/repos/matanlurey/code_builder/releases{/id}","deployments_url":"https://api.github.com/repos/matanlurey/code_builder/deployments","created_at":"2016-09-14T00:33:38Z","updated_at":"2016-09-14T00:33:40Z","pushed_at":"2016-09-16T04:17:09Z","git_url":"git://github.com/matanlurey/code_builder.git","ssh_url":"git@github.com:matanlurey/code_builder.git","clone_url":"https://github.com/matanlurey/code_builder.git","svn_url":"https://github.com/matanlurey/code_builder","homepage":"","size":55,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dart-lang:master","ref":"master","sha":"cde2a56184f2af31c68077846adf811603069ee8","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":66028865,"name":"code_builder","full_name":"dart-lang/code_builder","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/code_builder","description":"A fluent API for generating valid Dart source code","fork":false,"url":"https://api.github.com/repos/dart-lang/code_builder","forks_url":"https://api.github.com/repos/dart-lang/code_builder/forks","keys_url":"https://api.github.com/repos/dart-lang/code_builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/code_builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/code_builder/teams","hooks_url":"https://api.github.com/repos/dart-lang/code_builder/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/code_builder/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/code_builder/events","assignees_url":"https://api.github.com/repos/dart-lang/code_builder/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/code_builder/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/code_builder/tags","blobs_url":"https://api.github.com/repos/dart-lang/code_builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/code_builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/code_builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/code_builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/code_builder/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/code_builder/languages","stargazers_url":"https://api.github.com/repos/dart-lang/code_builder/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/code_builder/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/code_builder/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/code_builder/subscription","commits_url":"https://api.github.com/repos/dart-lang/code_builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/code_builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/code_builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/code_builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/code_builder/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/code_builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/code_builder/merges","archive_url":"https://api.github.com/repos/dart-lang/code_builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/code_builder/downloads","issues_url":"https://api.github.com/repos/dart-lang/code_builder/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/code_builder/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/code_builder/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/code_builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/code_builder/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/code_builder/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/code_builder/deployments","created_at":"2016-08-18T20:34:56Z","updated_at":"2016-09-14T05:42:49Z","pushed_at":"2016-09-16T04:20:41Z","git_url":"git://github.com/dart-lang/code_builder.git","ssh_url":"git@github.com:dart-lang/code_builder.git","clone_url":"https://github.com/dart-lang/code_builder.git","svn_url":"https://github.com/dart-lang/code_builder","homepage":"","size":49,"stargazers_count":3,"watchers_count":3,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dart-lang/code_builder/pulls/11"},"html":{"href":"https://github.com/dart-lang/code_builder/pull/11"},"issue":{"href":"https://api.github.com/repos/dart-lang/code_builder/issues/11"},"comments":{"href":"https://api.github.com/repos/dart-lang/code_builder/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/dart-lang/code_builder/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/dart-lang/code_builder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dart-lang/code_builder/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/dart-lang/code_builder/statuses/5760c97bd8c45fdd5e06dc7ffe479e15a911a658"}}}}
{"actor":{"display_login":"matanlurey"}}