mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
Add a leafnode class to clearly indicate what node types are leaf nodes
This commit is contained in:
@@ -132,10 +132,16 @@
|
||||
TwoChildNode(Node *left, Node *right) : InnerNode(left, right) { };
|
||||
};
|
||||
|
||||
/* Match nothing (//). */
|
||||
class EpsNode : public Node {
|
||||
class LeafNode : public Node {
|
||||
public:
|
||||
EpsNode()
|
||||
LeafNode() : Node() { };
|
||||
|
||||
};
|
||||
|
||||
/* Match nothing (//). */
|
||||
class EpsNode : public LeafNode {
|
||||
public:
|
||||
EpsNode() : LeafNode()
|
||||
{
|
||||
nullable = true;
|
||||
label = 0;
|
||||
@@ -169,9 +175,9 @@
|
||||
* characters that the regular expression matches. We also consider
|
||||
* AcceptNodes import: they indicate when a regular expression matches.
|
||||
*/
|
||||
class ImportantNode : public Node {
|
||||
class ImportantNode : public LeafNode {
|
||||
public:
|
||||
ImportantNode() { }
|
||||
ImportantNode() : LeafNode() { }
|
||||
void compute_firstpos()
|
||||
{
|
||||
firstpos.insert(this);
|
||||
|
Reference in New Issue
Block a user