The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::perl2js::Converter::Node::Branch

INHERITANCE

App::perl2js::Converter::Node::Branch
isa App::perl2js::Converter::Node

DESCRIPTION

Branch node has two pointers of 'left' and 'right'.
Also, this node has 'next' pointer to access next statement's node.
This node includes token kind of 'Operator', 'Assign' and 'Comma'.

LAYOUT

 ____________________________________        _____________
|                                    | next |             |
|   Branch(Operator,Assign,Comma)    |----->|             |
|____________________________________|      |_____________|
         |                   |
   left  |                   | right
         v                   v

Example

e.g.) 1 + 2 + 3; ...

                 |
       __________|__________        _________
      |                     | next |         |
      |        Add(+)       |----->|  .....  |
      |_____________________|      |_________|
          |             |
     left |             | right
   _______v_______    __v__
  |               |  |     |
  |     Add(+)    |  |  3  |
  |_______________|  |_____|
     |         |
left |         | right
   __v__     __v__
  |     |   |     |
  |  1  |   |  2  |
  |_____|   |_____|

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.