This implements a rather unexpected detail when combining
reference "=<" and copy "<" operator from old TypoScript
parser.
Copy operator:
lib.source1 = TEXT
lib.source1.value = source1Value
lib.source2.otherValue = source2OtherValue
tt_content.target < lib.source1
tt_content.target < lib.source2
Result:
tt_content.target = TEXT
tt_content.target.otherValue = source2OtherValue
The tt_content.target existing value from lib.source1 is
kept, but children are reset - lib.source1.value is not
within tt_content.target anymore.
Now reference first, then copy:
lib.source1 = TEXT
lib.source1.value = source1Value
lib.source2.otherValue = source2OtherValue
tt_content.target =< lib.source1
tt_content.target < lib.source2
Old parser after resolving reference in FE:
tt_content.target = TEXT
tt_content.target.value = source1Value
tt_content.target.otherValue = source2OtherValue
New parser after resolving reference in FE:
tt_content.target = TEXT
tt_content.target.otherValue = source2OtherValue
The old parser keeps existing references when the copy
operator does not reset the value to something else.
The patch adapts the new parser to behave identical and
refactors the AST copy method to better documented, more
easy and eventually also quicker code.