GitHub PullRequestReviewCommentEvent at 2014-10-14 10:52:54
Repository: snowcrash
Actor: zdne
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/apiaryio/snowcrash/pulls/comments/18820786","id":18820786,"diff_hunk":"@@ -0,0 +1,258 @@\n+//\n+//  MSON.h\n+//  snowcrash\n+//\n+//  Created by Pavan Kumar Sunkara on 10/9/14.\n+//  Copyright (c) 2014 Apiary Inc. All rights reserved.\n+//\n+\n+#ifndef SNOWCRASH_MSON_H\n+#define SNOWCRASH_MSON_H\n+\n+#include <vector>\n+#include <string>\n+#include \"Platform.h\"\n+#include \"Markdown.h\"\n+\n+/**\n+ * MSON Abstract Syntax Tree\n+ * -------------------------\n+ *\n+ * Data types in this document define the MSON AST\n+ */\n+\n+namespace mson {\n+\n+    /** Literal */\n+    typedef std::string Literal;\n+\n+    /** A simple or actual value */\n+    struct Value {\n+\n+        /** Literal value */\n+        Literal literal;\n+\n+        /** Flag to denote variable value */\n+        bool variable;\n+    };\n+\n+    /** Collection of values */\n+    typedef std::vector<Value> Values;\n+\n+    /** Type symbol (identifier) */\n+    struct Symbol {\n+\n+        /** Name of the symbol */\n+        Literal literal;\n+\n+        /** Flag to denote variable type name */\n+        bool variable;\n+    };\n+\n+    /** Value of type name if based type */\n+    enum BaseTypeName {\n+        UndefinedTypeName, // Not a base type name\n+        BooleanTypeName,   // `boolean` type name\n+        StringTypeName,    // `string` type name\n+        NumberTypeName,    // `number` type name\n+        ArrayTypeName,     // `array` type name\n+        EnumTypeName,      // `enum` type name\n+        ObjectTypeName     // `object` type name\n+    };\n+\n+    /** Base or named type's name */\n+    struct TypeName {\n+\n+        /** EITHER Base type's value */\n+        BaseTypeName name;\n+\n+        /** OR Named type's identifier */\n+        Symbol symbol;\n+    };\n+\n+    /** Collection of type names */\n+    typedef std::vector<TypeName> TypeNames;\n+\n+    /** Attribute of a type */\n+    enum TypeAttribute {\n+        RequiredTypeAttribute = (1 << 0),  // The type is required\n+        OptionalTypeAttribute = (1 << 1),  // The type is optional\n+        DefaultTypeAttribute  = (1 << 2),  // The type is default\n+        SampleTypeAttribute   = (1 << 3),  // The type is a sample\n+        FixedTypeAttribute    = (1 << 4)   // The type is fixed\n+    };\n+\n+    /** List of type attributes */\n+    typedef unsigned int TypeAttributes;\n+\n+    /** Defines sub-typed types for a type */\n+    struct TypeSpecification {\n+\n+        /** Name of the type */\n+        TypeName name;\n+\n+        /** Array of nested types */\n+        TypeNames nestedTypes;\n+    };\n+\n+    /** Definition of an instance of a type */\n+    struct TypeDefinition {\n+\n+        /** Type specification */\n+        TypeSpecification typeSpecification;\n+\n+        /** List of type attributes (byte-wise OR) */\n+        TypeAttributes attributes;\n+    };\n+\n+    /** Value definition of a type instance */\n+    struct ValueDefinition {\n+\n+        /** List of values */\n+        Values values;\n+\n+        /** Type of the values */\n+        TypeDefinition typedefinition;\n+    };\n+\n+    /** Forward Declaration for member type */\n+    struct MemberType;\n+\n+    /** Collection of member types */\n+    typedef std::vector<MemberType> MemberTypes;\n+\n+    /** Type of a type section */\n+    enum TypeSectionType {\n+        UndefinedTypeSectionType,        // Unknown\n+        BlockDescriptionTypeSectionType, // Markdown block description\n+        MemberTypeSectionType,           // Contains member types\n+        SampleTypeSectionType,           // Sample member types\n+        DefaultTypeSectionType           // Default member types\n+    };\n+\n+    /** Section of a type */\n+    struct TypeSection {\n+\n+        /** Denotes the type of the section */\n+        TypeSectionType type;\n+\n+        /** Content of the type section */\n+        class TypeSectionContent {","path":"src/MSON.h","position":140,"original_position":140,"commit_id":"724a73c3b1277fd3762a521552b6576e4c98055f","original_commit_id":"646b1753cccf675693f2536012cb37f7c855cbc7","user":{"login":"zdne","id":613617,"avatar_url":"https://avatars.githubusercontent.com/u/613617?v=2","gravatar_id":"","url":"https://api.github.com/users/zdne","html_url":"https://github.com/zdne","followers_url":"https://api.github.com/users/zdne/followers","following_url":"https://api.github.com/users/zdne/following{/other_user}","gists_url":"https://api.github.com/users/zdne/gists{/gist_id}","starred_url":"https://api.github.com/users/zdne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdne/subscriptions","organizations_url":"https://api.github.com/users/zdne/orgs","repos_url":"https://api.github.com/users/zdne/repos","events_url":"https://api.github.com/users/zdne/events{/privacy}","received_events_url":"https://api.github.com/users/zdne/received_events","type":"User","site_admin":false},"body":"with that being said whichever you prefer is fine with me, but personally I would use struct to stay consistent with the rest of MSON.h","created_at":"2014-10-14T10:52:54Z","updated_at":"2014-10-14T10:52:54Z","html_url":"https://github.com/apiaryio/snowcrash/pull/233#discussion_r18820786","pull_request_url":"https://api.github.com/repos/apiaryio/snowcrash/pulls/233","_links":{"self":{"href":"https://api.github.com/repos/apiaryio/snowcrash/pulls/comments/18820786"},"html":{"href":"https://github.com/apiaryio/snowcrash/pull/233#discussion_r18820786"},"pull_request":{"href":"https://api.github.com/repos/apiaryio/snowcrash/pulls/233"}}},"pull_request":{"url":"https://api.github.com/repos/apiaryio/snowcrash/pulls/233","id":22499433,"html_url":"https://github.com/apiaryio/snowcrash/pull/233","diff_url":"https://github.com/apiaryio/snowcrash/pull/233.diff","patch_url":"https://github.com/apiaryio/snowcrash/pull/233.patch","issue_url":"https://api.github.com/repos/apiaryio/snowcrash/issues/233","number":233,"state":"open","locked":false,"title":"MSON AST","user":{"login":"pksunkara","id":174703,"avatar_url":"https://avatars.githubusercontent.com/u/174703?v=2","gravatar_id":"","url":"https://api.github.com/users/pksunkara","html_url":"https://github.com/pksunkara","followers_url":"https://api.github.com/users/pksunkara/followers","following_url":"https://api.github.com/users/pksunkara/following{/other_user}","gists_url":"https://api.github.com/users/pksunkara/gists{/gist_id}","starred_url":"https://api.github.com/users/pksunkara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pksunkara/subscriptions","organizations_url":"https://api.github.com/users/pksunkara/orgs","repos_url":"https://api.github.com/users/pksunkara/repos","events_url":"https://api.github.com/users/pksunkara/events{/privacy}","received_events_url":"https://api.github.com/users/pksunkara/received_events","type":"User","site_admin":false},"body":"C++ implementation. For @zdne to review.\r\n\r\n@fosrias and @honzajavorek can take a look if they want.","created_at":"2014-10-09T15:02:55Z","updated_at":"2014-10-14T10:52:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27c63301608d86d5adf0ad9bb5880dd0b7ec84e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apiaryio/snowcrash/pulls/233/commits","review_comments_url":"https://api.github.com/repos/apiaryio/snowcrash/pulls/233/comments","review_comment_url":"https://api.github.com/repos/apiaryio/snowcrash/pulls/comments/{number}","comments_url":"https://api.github.com/repos/apiaryio/snowcrash/issues/233/comments","statuses_url":"https://api.github.com/repos/apiaryio/snowcrash/statuses/724a73c3b1277fd3762a521552b6576e4c98055f","head":{"label":"apiaryio:pksunkara/mson","ref":"pksunkara/mson","sha":"724a73c3b1277fd3762a521552b6576e4c98055f","user":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=2","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":9173280,"name":"snowcrash","full_name":"apiaryio/snowcrash","owner":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=2","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiaryio/snowcrash","description":"API Blueprint Parser","fork":false,"url":"https://api.github.com/repos/apiaryio/snowcrash","forks_url":"https://api.github.com/repos/apiaryio/snowcrash/forks","keys_url":"https://api.github.com/repos/apiaryio/snowcrash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiaryio/snowcrash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiaryio/snowcrash/teams","hooks_url":"https://api.github.com/repos/apiaryio/snowcrash/hooks","issue_events_url":"https://api.github.com/repos/apiaryio/snowcrash/issues/events{/number}","events_url":"https://api.github.com/repos/apiaryio/snowcrash/events","assignees_url":"https://api.github.com/repos/apiaryio/snowcrash/assignees{/user}","branches_url":"https://api.github.com/repos/apiaryio/snowcrash/branches{/branch}","tags_url":"https://api.github.com/repos/apiaryio/snowcrash/tags","blobs_url":"https://api.github.com/repos/apiaryio/snowcrash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiaryio/snowcrash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiaryio/snowcrash/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiaryio/snowcrash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiaryio/snowcrash/statuses/{sha}","languages_url":"https://api.github.com/repos/apiaryio/snowcrash/languages","stargazers_url":"https://api.github.com/repos/apiaryio/snowcrash/stargazers","contributors_url":"https://api.github.com/repos/apiaryio/snowcrash/contributors","subscribers_url":"https://api.github.com/repos/apiaryio/snowcrash/subscribers","subscription_url":"https://api.github.com/repos/apiaryio/snowcrash/subscription","commits_url":"https://api.github.com/repos/apiaryio/snowcrash/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiaryio/snowcrash/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiaryio/snowcrash/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiaryio/snowcrash/issues/comments/{number}","contents_url":"https://api.github.com/repos/apiaryio/snowcrash/contents/{+path}","compare_url":"https://api.github.com/repos/apiaryio/snowcrash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiaryio/snowcrash/merges","archive_url":"https://api.github.com/repos/apiaryio/snowcrash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiaryio/snowcrash/downloads","issues_url":"https://api.github.com/repos/apiaryio/snowcrash/issues{/number}","pulls_url":"https://api.github.com/repos/apiaryio/snowcrash/pulls{/number}","milestones_url":"https://api.github.com/repos/apiaryio/snowcrash/milestones{/number}","notifications_url":"https://api.github.com/repos/apiaryio/snowcrash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiaryio/snowcrash/labels{/name}","releases_url":"https://api.github.com/repos/apiaryio/snowcrash/releases{/id}","created_at":"2013-04-02T15:23:04Z","updated_at":"2014-10-09T19:11:14Z","pushed_at":"2014-10-14T10:44:21Z","git_url":"git://github.com/apiaryio/snowcrash.git","ssh_url":"git@github.com:apiaryio/snowcrash.git","clone_url":"https://github.com/apiaryio/snowcrash.git","svn_url":"https://github.com/apiaryio/snowcrash","homepage":null,"size":10227,"stargazers_count":176,"watchers_count":176,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":23,"forks":30,"open_issues":23,"watchers":176,"default_branch":"master"}},"base":{"label":"apiaryio:shared/mson-integration","ref":"shared/mson-integration","sha":"a9ac1b555da3b1d790085c2e046676a0d19cecc0","user":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=2","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":9173280,"name":"snowcrash","full_name":"apiaryio/snowcrash","owner":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=2","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiaryio/snowcrash","description":"API Blueprint Parser","fork":false,"url":"https://api.github.com/repos/apiaryio/snowcrash","forks_url":"https://api.github.com/repos/apiaryio/snowcrash/forks","keys_url":"https://api.github.com/repos/apiaryio/snowcrash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiaryio/snowcrash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiaryio/snowcrash/teams","hooks_url":"https://api.github.com/repos/apiaryio/snowcrash/hooks","issue_events_url":"https://api.github.com/repos/apiaryio/snowcrash/issues/events{/number}","events_url":"https://api.github.com/repos/apiaryio/snowcrash/events","assignees_url":"https://api.github.com/repos/apiaryio/snowcrash/assignees{/user}","branches_url":"https://api.github.com/repos/apiaryio/snowcrash/branches{/branch}","tags_url":"https://api.github.com/repos/apiaryio/snowcrash/tags","blobs_url":"https://api.github.com/repos/apiaryio/snowcrash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiaryio/snowcrash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiaryio/snowcrash/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiaryio/snowcrash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiaryio/snowcrash/statuses/{sha}","languages_url":"https://api.github.com/repos/apiaryio/snowcrash/languages","stargazers_url":"https://api.github.com/repos/apiaryio/snowcrash/stargazers","contributors_url":"https://api.github.com/repos/apiaryio/snowcrash/contributors","subscribers_url":"https://api.github.com/repos/apiaryio/snowcrash/subscribers","subscription_url":"https://api.github.com/repos/apiaryio/snowcrash/subscription","commits_url":"https://api.github.com/repos/apiaryio/snowcrash/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiaryio/snowcrash/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiaryio/snowcrash/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiaryio/snowcrash/issues/comments/{number}","contents_url":"https://api.github.com/repos/apiaryio/snowcrash/contents/{+path}","compare_url":"https://api.github.com/repos/apiaryio/snowcrash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiaryio/snowcrash/merges","archive_url":"https://api.github.com/repos/apiaryio/snowcrash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiaryio/snowcrash/downloads","issues_url":"https://api.github.com/repos/apiaryio/snowcrash/issues{/number}","pulls_url":"https://api.github.com/repos/apiaryio/snowcrash/pulls{/number}","milestones_url":"https://api.github.com/repos/apiaryio/snowcrash/milestones{/number}","notifications_url":"https://api.github.com/repos/apiaryio/snowcrash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiaryio/snowcrash/labels{/name}","releases_url":"https://api.github.com/repos/apiaryio/snowcrash/releases{/id}","created_at":"2013-04-02T15:23:04Z","updated_at":"2014-10-09T19:11:14Z","pushed_at":"2014-10-14T10:44:21Z","git_url":"git://github.com/apiaryio/snowcrash.git","ssh_url":"git@github.com:apiaryio/snowcrash.git","clone_url":"https://github.com/apiaryio/snowcrash.git","svn_url":"https://github.com/apiaryio/snowcrash","homepage":null,"size":10227,"stargazers_count":176,"watchers_count":176,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":23,"forks":30,"open_issues":23,"watchers":176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apiaryio/snowcrash/pulls/233"},"html":{"href":"https://github.com/apiaryio/snowcrash/pull/233"},"issue":{"href":"https://api.github.com/repos/apiaryio/snowcrash/issues/233"},"comments":{"href":"https://api.github.com/repos/apiaryio/snowcrash/issues/233/comments"},"review_comments":{"href":"https://api.github.com/repos/apiaryio/snowcrash/pulls/233/comments"},"review_comment":{"href":"https://api.github.com/repos/apiaryio/snowcrash/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/apiaryio/snowcrash/pulls/233/commits"},"statuses":{"href":"https://api.github.com/repos/apiaryio/snowcrash/statuses/724a73c3b1277fd3762a521552b6576e4c98055f"}}}}