RewriteMechanism
AST Rewrite Mechanism
Synopsis
Declared in <src/docs/mrdocs/modules/ast_rewrite.h>
struct RewriteMechanism;
Description
The AST rewrite mechanism permits editing an application's AST, including addition, deletion, or replacement of subtrees. Using the rewrite system as part of a traversal is a common way to build a preprocessor. A transformation is implemented by applying a specific change to the AST and then unparsing the result.
The primary userālevel entry point is AST_Rewrite::addSourceCodeString, which uses enum values defined in AST_Rewrite to specify insertion locations.
See rose_midend.
Created with MrDocs