@@ -115,7 +115,7 @@ class SyntaxCollection : public Syntax {
115115 NewLayout.reserve (OldLayout.size () + 1 );
116116 std::copy (OldLayout.begin (), OldLayout.end (), back_inserter (NewLayout));
117117 NewLayout.push_back (E.getRaw ());
118- auto Raw = RawSyntax::make (CollectionKind, NewLayout, getRaw ()->getPresence ());
118+ auto Raw = RawSyntax::makeAndCalcLength (CollectionKind, NewLayout, getRaw ()->getPresence ());
119119 return SyntaxCollection<CollectionKind, Element>(Data.replacingSelf (Raw));
120120 }
121121
@@ -125,7 +125,7 @@ class SyntaxCollection : public Syntax {
125125 SyntaxCollection<CollectionKind, Element> removingLast () const {
126126 assert (!empty ());
127127 auto NewLayout = getRaw ()->getLayout ().drop_back ();
128- auto Raw = RawSyntax::make (CollectionKind, NewLayout, getRaw ()->getPresence ());
128+ auto Raw = RawSyntax::makeAndCalcLength (CollectionKind, NewLayout, getRaw ()->getPresence ());
129129 return SyntaxCollection<CollectionKind, Element>(Data.replacingSelf (Raw));
130130 }
131131
@@ -136,7 +136,7 @@ class SyntaxCollection : public Syntax {
136136 std::vector<RC<RawSyntax>> NewLayout = { E.getRaw () };
137137 std::copy (OldLayout.begin (), OldLayout.end (),
138138 std::back_inserter (NewLayout));
139- auto Raw = RawSyntax::make (CollectionKind, NewLayout, getRaw ()->getPresence ());
139+ auto Raw = RawSyntax::makeAndCalcLength (CollectionKind, NewLayout, getRaw ()->getPresence ());
140140 return SyntaxCollection<CollectionKind, Element>(Data.replacingSelf (Raw));
141141 }
142142
@@ -146,7 +146,7 @@ class SyntaxCollection : public Syntax {
146146 SyntaxCollection<CollectionKind, Element> removingFirst () const {
147147 assert (!empty ());
148148 auto NewLayout = getRaw ()->getLayout ().drop_front ();
149- auto Raw = RawSyntax::make (CollectionKind, NewLayout, getRaw ()->getPresence ());
149+ auto Raw = RawSyntax::makeAndCalcLength (CollectionKind, NewLayout, getRaw ()->getPresence ());
150150 return SyntaxCollection<CollectionKind, Element>(Data.replacingSelf (Raw));
151151 }
152152
@@ -165,7 +165,7 @@ class SyntaxCollection : public Syntax {
165165 NewLayout.push_back (E.getRaw ());
166166 std::copy (OldLayout.begin () + i, OldLayout.end (),
167167 std::back_inserter (NewLayout));
168- auto Raw = RawSyntax::make (CollectionKind, NewLayout, getRaw ()->getPresence ());
168+ auto Raw = RawSyntax::makeAndCalcLength (CollectionKind, NewLayout, getRaw ()->getPresence ());
169169 return SyntaxCollection<CollectionKind, Element>(Data.replacingSelf (Raw));
170170 }
171171
@@ -176,13 +176,13 @@ class SyntaxCollection : public Syntax {
176176 auto iterator = NewLayout.begin ();
177177 std::advance (iterator, i);
178178 NewLayout.erase (iterator);
179- auto Raw = RawSyntax::make (CollectionKind, NewLayout, getRaw ()->getPresence ());
179+ auto Raw = RawSyntax::makeAndCalcLength (CollectionKind, NewLayout, getRaw ()->getPresence ());
180180 return SyntaxCollection<CollectionKind, Element>(Data.replacingSelf (Raw));
181181 }
182182
183183 // / Return an empty syntax collection of this type.
184184 SyntaxCollection<CollectionKind, Element> cleared () const {
185- auto Raw = RawSyntax::make (CollectionKind, {}, getRaw ()->getPresence ());
185+ auto Raw = RawSyntax::makeAndCalcLength (CollectionKind, {}, getRaw ()->getPresence ());
186186 return SyntaxCollection<CollectionKind, Element>(Data.replacingSelf (Raw));
187187 }
188188
0 commit comments