• nbarth@chromium.org's avatar
    Merge idl_definitions_builder.py into idl_definitions.py · b8baaeb5
    nbarth@chromium.org authored
    idl_definitions_builder.py was separate from idl_definitions.py
    b/c the latter had lots of Perl compatibility cruft (JSON export etc.)
    Now that it's gone, there's no reason to have these separate, as
    idl_definitions was almost only class definitions, and
    idl_definitions_builder was basically constructors.
    
    Keeping them separate made it harder to read (b/c had to bounce back
    and forth), and the calls to the actual constructors were incredibly
    long.
    
    This merges them, deleting one file and making the code quite simple.
    Net -70 lines, though more like -100 due to adding a few comments
    (class diagram).
    
    Change is just merging the functions into constructors (in a few cases
    changing an alternative constructor into a class method) and adding
    a few comments.
    
    Further cleanup is possible (remove IdlEnum and IdlUnionType),
    but involve CG changes, so will do in followup.
    
    BUG=345137
    TBR=haraken
    
    Review URL: https://codereview.chromium.org/177233006
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@168582 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    b8baaeb5
idl_definitions.py 28.6 KB