• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rieske / trans / 28351425696

29 Jun 2026 05:48AM UTC coverage: 90.635% (-0.002%) from 90.637%
28351425696

Pull #39

github

rieske
Add default visitChildren on AST nodes

Default visitChildren accepts the node itself so non-containers need no
override. Block marks visitChildren as override, and FunctionDefinition
visitBodyChildren uses the virtual instead of dynamic_cast to Block.
Pull Request #39: Add default visitChildren on AST nodes

1 of 2 new or added lines in 2 files covered. (50.0%)

4936 of 5446 relevant lines covered (90.64%)

228285.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/ast/AbstractSyntaxTreeNode.h
1
#ifndef ABSTRACTSYNTAXTREENODE_H_
2
#define ABSTRACTSYNTAXTREENODE_H_
3

4
namespace ast {
5

6
class AbstractSyntaxTreeVisitor;
7

8
class AbstractSyntaxTreeNode {
9
public:
10
    AbstractSyntaxTreeNode() = default;
14,338✔
11
    virtual ~AbstractSyntaxTreeNode() = default;
19,974✔
12

13
    virtual void accept(AbstractSyntaxTreeVisitor& visitor) = 0;
14

15
    // Visit this node's children directly; for a non-container node that is just the node itself.
NEW
16
    virtual void visitChildren(AbstractSyntaxTreeVisitor& visitor) { accept(visitor); }
×
17

18
protected:
19
    AbstractSyntaxTreeNode(const AbstractSyntaxTreeNode&) = default;
2,852✔
20
    AbstractSyntaxTreeNode(AbstractSyntaxTreeNode&&) = default;
2,784✔
21
    AbstractSyntaxTreeNode& operator=(const AbstractSyntaxTreeNode&) = default;
22
    AbstractSyntaxTreeNode& operator=(AbstractSyntaxTreeNode&&) = default;
23
};
24

25
} // namespace ast
26

27
#endif // ABSTRACTSYNTAXTREENODE_H_
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc