... | @@ -119,7 +119,10 @@ Replace `cmake-build-debug` with the directory where you keep the build version |
... | @@ -119,7 +119,10 @@ Replace `cmake-build-debug` with the directory where you keep the build version |
|
Copy this template traversal header code into the file you created in step 2.
|
|
Copy this template traversal header code into the file you created in step 2.
|
|
|
|
|
|
```c
|
|
```c
|
|
/** <!-**********************************************************-->
|
|
#ifndef _SAC_TRAVTEMPLATE_H_
|
|
|
|
#define _SAC_TRAVTEMPLATE_H_
|
|
|
|
|
|
|
|
/*******************************************************************
|
|
* author: <Your name>
|
|
* author: <Your name>
|
|
* created-at: dd-mm-yyyy
|
|
* created-at: dd-mm-yyyy
|
|
* description:
|
|
* description:
|
... | @@ -128,9 +131,7 @@ Copy this template traversal header code into the file you created in step 2. |
... | @@ -128,9 +131,7 @@ Copy this template traversal header code into the file you created in step 2. |
|
* Prefix: TEMP
|
|
* Prefix: TEMP
|
|
*
|
|
*
|
|
*********************************************************************/
|
|
*********************************************************************/
|
|
#ifndef _SAC_TRAVTEMPLATE_H_
|
|
|
|
#define _SAC_TRAVTEMPLATE_H_
|
|
|
|
|
|
|
|
#include "types.h"
|
|
#include "types.h"
|
|
|
|
|
|
extern node *TEMPdoTemplateTraversal (node *syntax_tree);
|
|
extern node *TEMPdoTemplateTraversal (node *syntax_tree);
|
... | @@ -207,14 +208,17 @@ struct INFO { |
... | @@ -207,14 +208,17 @@ struct INFO { |
|
node *fundef; // some random info
|
|
node *fundef; // some random info
|
|
};
|
|
};
|
|
|
|
|
|
node *EXdoExampleTraversal (node *syntax_tree) {
|
|
node *
|
|
|
|
EXdoExampleTraversal (node *syntax_tree) {
|
|
return syntax_tree;
|
|
return syntax_tree;
|
|
}
|
|
}
|
|
|
|
|
|
node *EXmodule (node *arg_node, info *arg_info) {
|
|
node *
|
|
|
|
EXmodule (node *arg_node, info *arg_info) {
|
|
return arg_node;
|
|
return arg_node;
|
|
}
|
|
}
|
|
node *EXfundef (node *arg_node, info *arg_info) {
|
|
node *
|
|
|
|
EXfundef (node *arg_node, info *arg_info) {
|
|
return arg_node;
|
|
return arg_node;
|
|
}
|
|
}
|
|
```
|
|
```
|
... | @@ -238,12 +242,8 @@ There is also a template for your traversal `.c` file, here it is: |
... | @@ -238,12 +242,8 @@ There is also a template for your traversal `.c` file, here it is: |
|
*
|
|
*
|
|
* @brief short description
|
|
* @brief short description
|
|
*
|
|
*
|
|
* description:
|
|
* Longer traversal description goes here with examples.
|
|
* Longer traversal description goes here with examples.
|
|
|
|
*
|
|
*
|
|
* example:
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
**********************************************************/
|
|
**********************************************************/
|
|
|
|
|
|
#include "template_traversal.h" // update to your .h file
|
|
#include "template_traversal.h" // update to your .h file
|
... | @@ -367,8 +367,6 @@ DummyStaticHelper (node *arg_node) |
... | @@ -367,8 +367,6 @@ DummyStaticHelper (node *arg_node) |
|
|
|
|
|
DBUG_RETURN (arg_node);
|
|
DBUG_RETURN (arg_node);
|
|
}
|
|
}
|
|
|
|
|
|
/* @} */
|
|
|
|
```
|
|
```
|
|
|
|
|
|
Copy this template into your `.c` file.
|
|
Copy this template into your `.c` file.
|
... | | ... | |