diff --git a/ql/src/codeql_ql/printAst.qll b/ql/src/codeql_ql/printAst.qll index cef70deca5c..c429645e1f0 100644 --- a/ql/src/codeql_ql/printAst.qll +++ b/ql/src/codeql_ql/printAst.qll @@ -18,7 +18,10 @@ class PrintAstConfiguration extends string { /** * Holds if the given node should be printed. */ - predicate shouldPrintNode(AstNode n) { not n instanceof LineComment } + predicate shouldPrintNode(AstNode n) { + not n instanceof LineComment and + not n instanceof ReservedWord + } } /**