Add a pattern id variable to all nodes.

This commit is contained in:
2017-01-26 15:02:44 -08:00
parent ee40622ceb
commit bae15027c3
2 changed files with 30 additions and 30 deletions

View File

@@ -52,6 +52,10 @@ struct pattern_node_s {
* The id is unique within the pattern.
*/
int id;
/**
* The id of the pattern that this node belongs to.
*/
int pattern_id;
/**
* The node's data that varies based on type.
@@ -122,16 +126,6 @@ struct pattern_node_s {
*/
struct pattern_node_s* right;
} fork_s;
/**
* Data for an "end" node.
*/
struct {
/**
* The ID of the pattern that just finished matching.
*/
int pattern_id;
} end_s;
} data_u;
};