问题
I am trying to create an abstract syntax Tree for the following 2 C/C++/Java code pieces:
1) return j++-200*20-++A*7
2) return j++-200*20-A++*7
Can someone please explain their difference when it comes to their AST?
回答1:
return j++ - 200*20 - ++A*7
and return j++ - 200*20 - A++*7
will have identical ASTs down to the node involving A
. The first will have a pre-increment A
node, while the second will have a post-increment A
node.
来源:https://stackoverflow.com/questions/40700677/abstract-syntax-tree-for-this-case