summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-22 14:56:19 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-24 16:01:15 -0700
commit308a2e24f8690a76d3ada08f4c5cfb70c6cccbb5 (patch)
tree0a7d76adfd635f5b0fe782c27f264873dc074517 /src
parent16eb3c65245bb8a6c60ee3bb3ec7b96e18fe62c6 (diff)
downloadbinaryen-308a2e24f8690a76d3ada08f4c5cfb70c6cccbb5.tar.gz
binaryen-308a2e24f8690a76d3ada08f4c5cfb70c6cccbb5.tar.bz2
binaryen-308a2e24f8690a76d3ada08f4c5cfb70c6cccbb5.zip
comment on replaceCurrent
Diffstat (limited to 'src')
-rw-r--r--src/wasm-traversal.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h
index 7b160ed3d..a2e29ea77 100644
--- a/src/wasm-traversal.h
+++ b/src/wasm-traversal.h
@@ -156,7 +156,10 @@ struct Walker : public VisitorType {
// Useful methods for visitor implementions
- // Replace the current node
+ // Replace the current node. You can call this in your visit*() methods.
+ // Note that the visit*() for the result node is not called for you (i.e.,
+ // just one visit*() method is called by the traversal; if you replace a node,
+ // and you want to process the output, you must do that explicitly).
void replaceCurrent(Expression *expression) {
replace = expression;
}