Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1300)

Issue 10828407: JSON Schema Compiler supports Enums as types. (Closed)

Created:
8 years, 4 months ago by chebert
Modified:
8 years, 3 months ago
Reviewers:
Yoyo Zhou
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Changes: 1) IsEnumOrEnumRef is refactored to be in the cpp_type_generator. 2) Refactored GeneratePopulatePropertyFromValue to call private methods (it was getting to be unwieldy.) 3) Refactored most of the unittests to put values on the stack instead of scoped_ptrs. 4) Implemented Enums as types. Enums all have the ENUMERATION_NONE. BUG=141940 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=153849

Patch Set 1 #

Patch Set 2 : let's see where we are at #

Patch Set 3 : enum none value #

Patch Set 4 : rejiggering #

Patch Set 5 : optional enums now incorped #

Patch Set 6 : more testing of optional enums #

Total comments: 24

Patch Set 7 : . #

Patch Set 8 : added a todo comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+354 lines, -181 lines) Patch
M tools/json_schema_compiler/cc_generator.py View 1 2 3 4 5 6 7 8 chunks +188 lines, -125 lines 0 comments Download
M tools/json_schema_compiler/cpp_type_generator.py View 1 2 3 4 5 6 3 chunks +20 lines, -4 lines 0 comments Download
M tools/json_schema_compiler/h_generator.py View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 1 chunk +5 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/test/enums.json View 1 2 4 chunks +50 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/test/enums_unittest.cc View 1 2 3 4 5 2 chunks +80 lines, -52 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Yoyo Zhou
https://chromiumcodereview.appspot.com/10828407/diff/6002/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://chromiumcodereview.appspot.com/10828407/diff/6002/tools/json_schema_compiler/cc_generator.py#newcode590 tools/json_schema_compiler/cc_generator.py:590: type_var = '%(dst)s->%(name)s_type' nit: indent is 2 https://chromiumcodereview.appspot.com/10828407/diff/6002/tools/json_schema_compiler/cc_generator.py#newcode609 tools/json_schema_compiler/cc_generator.py:609: ...
8 years, 3 months ago (2012-08-27 23:56:04 UTC) #1
chebert
https://chromiumcodereview.appspot.com/10828407/diff/6002/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://chromiumcodereview.appspot.com/10828407/diff/6002/tools/json_schema_compiler/cc_generator.py#newcode590 tools/json_schema_compiler/cc_generator.py:590: type_var = '%(dst)s->%(name)s_type' On 2012/08/27 23:56:04, Yoyo Zhou wrote: ...
8 years, 3 months ago (2012-08-28 21:31:14 UTC) #2
Yoyo Zhou
LGTM although I still don't like that there are different CreateEnumValues being generated with the ...
8 years, 3 months ago (2012-08-28 22:54:51 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hebert.christopherj@chromium.org/10828407/17003
8 years, 3 months ago (2012-08-28 23:35:55 UTC) #4
commit-bot: I haz the power
8 years, 3 months ago (2012-08-29 04:07:14 UTC) #5
Change committed as 153849

Powered by Google App Engine
This is Rietveld 408576698