2
0
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:
John Johansen
2010-11-09 11:44:26 -08:00
parent aec77cecde
commit 04d6c727e1

View File

@@ -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);