Skip to content

Add more metadata for C++ print AST queries #4279

@aeisenberg

Description

@aeisenberg

Based on discussion with @dbartol there are some enhancements to the C++ Print AST query that I would like to propose.

  1. Along with each child node in the AST should contain metadata that describes the property in its parent that returns this node. Eg- the LHS of an AssignExpr would have metadata containing something like getLValue(). This would be displayed somehow in the AST Viewer in VS Code. (Perhaps as a tooltip, perhaps in the title, or in some other way). If possible, the metadata would also contain enough information so that the IDE could navigate back to the definition of the predicate (maybe the metadata from below and the name of the predicate is sufficient).
  2. Each node in the AST should contain metadata that describes its type so that it is possible for users to navigate to the declaration of that type. The type name already exists in the label, but it is not the fully qualified name, so there is not enough information to open that type in the IDE.

See also #4278.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions