New issue
Advanced search Search tips

Issue 765024 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

IDL parser does not dump properties by default

Project Member Reported by peria@chromium.org, Sep 14 2017

Issue description

Currently, IDL parser does not dump properties of IDLNode's, and its test depends on the output. I put an example at the bottom of this description.
For unit tests, we should distinguish the difference between different entries, and for users of output ASTs, its dumped text can be informative with rich information.

Verbose information should be suppressed, but why don't we output more information they have?


/** TREE
 *Interface(MyIfaceSerializer)
 *  Serializer()
 *  Serializer()
 *    Operation(toJSON)
 *      Arguments()
 *      Type()
 *        Any()
 *  Serializer()
 *  Serializer()
 *    Map()
 *  Serializer()
 *    Map()
 *  Serializer()
 *    Map()
 *  Serializer()
 *    Map()
 *  Serializer()
 *    Map()
 *  Serializer()
 *    Map()
 *  Serializer()
 *    Map()
 *  Serializer()
 *    List()
 *  Serializer()
 *    List()
 *  Serializer()
 *    List()
 */
interface MyIfaceSerializer {
  serializer;
  serializer any toJSON();
  serializer = name;
  serializer = {};
  serializer = { getter };
  serializer = { attribute };
  serializer = { inherit, attribute };
  serializer = { inherit };
  serializer = { inherit, name1, name2 };
  serializer = { name1, name2 };
  serializer = [];
  serializer = [getter];
  serializer = [name1, name2];
};
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25f6cb3f6b0be28925b54ec9b13dc3a040153d87

commit 25f6cb3f6b0be28925b54ec9b13dc3a040153d87
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Thu Sep 14 01:24:43 2017

IDL parser: Make dump tool of IDL parser to display more information

Current dump tool of IDL parser does not output properties by default,
so its test can miss some implementation errors such like
 - mistype of property names
 - not set necessary properties
 - set unnecessary properties

This CL make them visible and hence the output can be helpful for
developers who uses output ASTs.


Bug:  765024 
Change-Id: I008e7b78d3a862b53c6110627d08a350de0b282b
Reviewed-on: https://chromium-review.googlesource.com/664464
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501831}
[modify] https://crrev.com/25f6cb3f6b0be28925b54ec9b13dc3a040153d87/tools/idl_parser/idl_node.py
[modify] https://crrev.com/25f6cb3f6b0be28925b54ec9b13dc3a040153d87/tools/idl_parser/idl_parser.py
[modify] https://crrev.com/25f6cb3f6b0be28925b54ec9b13dc3a040153d87/tools/idl_parser/test_parser/callback_web.idl
[modify] https://crrev.com/25f6cb3f6b0be28925b54ec9b13dc3a040153d87/tools/idl_parser/test_parser/dictionary_web.idl
[modify] https://crrev.com/25f6cb3f6b0be28925b54ec9b13dc3a040153d87/tools/idl_parser/test_parser/interface_web.idl
[modify] https://crrev.com/25f6cb3f6b0be28925b54ec9b13dc3a040153d87/tools/idl_parser/test_parser/typedef_web.idl

Comment 2 by peria@chromium.org, Sep 14 2017

Status: Fixed (was: Started)

Sign in to add a comment