NAME
App::perl2js::Converter::Node::ForeachStmt
INHERITANCE
App::perl2js::Converter::Node::ForeachStmt
isa App::perl2js::Converter::Node
DESCRIPTION
This node is created to represent foreach statement.
ForeachStmt node has three pointers of 'cond', 'itr' and 'true_stmt'.
Also, this node has 'next' pointer to access next statement's node.
LAYOUT
_____________________________________ _____________
| | next | |
| ForeachStmt |----->| |
|_____________________________________| |_____________|
| | |
cond | itr | true_stmt |
v v v
Example
e.g.) foreach my $itr (@array) { $itr++ }
|
_______________________|________________________ _____________
| | next | |
| ForeachStmt(foreach) |----->| |
|________________________________________________| |_____________|
| | |
cond | itr | true_stmt |
____v____ ____v____ ____v____
| | | | | |
| ++ | | $itr | | ++ |
|_________| |_________| |_________|
| |
expr | expr |
____v____ ____v____
| | | |
| @array | | $itr |
|_________| |_________|
SEE ALSO
[App::perl2js::Converter::Node](http://search.cpan.org/perldoc?Compiler::Parser::Node)
AUTHOR
Masaaki Goshima (goccy) <goccy54@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) Masaaki Goshima (goccy).
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.