• Kent Tamura's avatar
    make_names: Add capability to produce code following Google C++ style · 55100ec8
    Kent Tamura authored
    Currently make_names.py produces blink::FooBarNames::baz_hoge constant
    variables. They don't match to Google C++ style.  This CL adds
    capability to produce code following Google C++ style.
    
    If 'namespace' field in foo_bar_names.json5 contains capital letters,
    the behavior isn't changed.
    Otherwise,
     - Don't append 'Names' to C++ namespace
     - Prepend 'k' to UpperCamelCase names
    So 'blink::foo_bar::kBazHoge' will be produced.
    
    Bug: 889726
    Change-Id: Iac8ca8040782c440d755067bec7c738d92189878
    Reviewed-on: https://chromium-review.googlesource.com/c/1288518Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
    Commit-Queue: Kent Tamura <tkent@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#601343}
    55100ec8
make_names.py 4.35 KB