Add some color to children-vs-codegen error (#583)

It took me some time to track down the root cause of `children`
not matching codegen, having the error message directly hint that
visit and codegen are probably mimatched (my visit was running
out-of-order) will likely help newbies get going faster.
This commit is contained in:
Steven Troxler 2022-01-05 13:26:51 -08:00 committed by GitHub
parent 601db54880
commit 3578f2fc3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,7 +137,9 @@ class CSTNodeTest(UnitTest):
codegen_children,
msg=(
"The list of children we got from `node.children` differs from the "
+ "children that were visited by `node._codegen`."
+ "children that were visited by `node._codegen`. This is probably "
+ "due to a mismatch between _visit_and_replace_children and "
+ "_codegen_impl."
),
)