Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

grammar fragment

code

A

Code Block
kids_adaptor.addaddChild(_root0, _adaptor.create($A));
root = _adaptor.rulePostProcessing(root, kids); // A
_localctx.tree = root;

A B

Code Block
kids_adaptor.addaddChild(_root0, _adaptor.create($A));
kids_adaptor.addaddChild(_root0, _adaptor.create($B));
root = _adaptor.rulePostProcessing(root, kids); // ^(nil A B)
_localctx.tree = root;

A^ B

Code Block
root_root0 = root==null ? $A : _adaptor.becomeRoot(root, $A, kids(_adaptor.create($A), _root0);
kids_adaptor.addaddChild(_root0, _adaptor.create($B));
root = _adaptor.rulePostProcessing(root, kids); // ^(A B)
_localctx.tree = root;

A B^

Code Block
kids_adaptor.addaddChild(_root0, _adaptor.create($A));
root_root0 = root==null ? $B : _adaptor.becomeRoot(root, $B_adaptor.create($B), kids_root0);
root = _adaptor.rulePostProcessing(root, kids); // ^(B A)
_localctx.tree = root;

A B^ C

Code Block
kids_adaptor.addaddChild(_root0, _adaptor.create($A));
root = root==null ? $B : _root0 = _adaptor.becomeRoot(root, $B, kids(_adaptor.create($B), _root0);
kids_adaptor.addaddChild(_root0, _adaptor.create($C));
root = _adaptor.rulePostProcessing(root, kids);// ^(B A C)
_localctx.tree = root;

A B^ C^ D

Code Block
kids_adaptor.addaddChild(_root0, _adaptor.create($A));
root_root0 = root==null ? $B : _adaptor.becomeRoot(root, $B, kids(_adaptor.create($B), _root0);
root = root==null ? $C :_root0 = _adaptor.becomeRoot(root, $C, kids(_adaptor.create($C), _root0);
kids_adaptor.addaddChild(_root0, _adaptor.create($D));
root = _adaptor.rulePostProcessing(root, kids); // ^(C ^(B A) D)
_localctx.tree = root;

a^ b

Code Block
root_root0 = root==null ? $a.tree : _adaptor.becomeRoot(root, $a.tree, kids_root0);
kids_adaptor.addaddChild(_root0, $b.tree);
root = _adaptor.rulePostProcessing(root, kids); // ^(A B)
_localctx.tree = root;

...