Add a pattern id variable to all nodes.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user