File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,6 +160,25 @@ public function isEnd(): bool
160160 }
161161
162162
163+ /**
164+ * Consumes the optional comma separating the tag name from its arguments.
165+ * Triggers deprecation when the comma is missing but arguments still follow.
166+ * A trailing modifier (|filter) is not considered arguments.
167+ * @internal
168+ */
169+ public function consumeCommaBeforeArguments (string $ tag ): void
170+ {
171+ if (
172+ !$ this ->stream ->tryConsume (', ' )
173+ && !$ this ->isEnd ()
174+ && !$ this ->stream ->is (Token::Php_FilterPipe)
175+ ) {
176+ $ position = $ this ->stream ->peek ()->position ;
177+ trigger_error ("Missing comma before arguments in { {$ tag }} tag $ position. " , E_USER_DEPRECATED );
178+ }
179+ }
180+
181+
163182 /** @throws Latte\CompileException */
164183 private function parse (string $ schema , bool $ recovery = false ): mixed
165184 {
You can’t perform that action at this time.
0 commit comments