added a space when rendering some expressions so they're more readable

This commit is contained in:
Vern Paxson 2024-05-16 14:25:32 -07:00 committed by Tim Wojtulewicz
parent 03b358f6d1
commit e84b60762a
33 changed files with 450 additions and 445 deletions

View file

@ -30,6 +30,11 @@
namespace zeek::detail {
const char* expr_name(ExprTag t) {
// Note that some of the names in the following have trailing spaces.
// These are for unary operations that (1) are identified by names
// rather than symbols, and (2) don't have custom ExprDescribe printers.
// Adding the spaces here lets them leverage the UnaryExpr::ExprDescribe
// method without it having to know about such expressions.
static const char* expr_names[int(NUM_EXPRS)] = {
"name",
"const",