@@ -49,7 +49,7 @@ public static function install(Latte\Compiler $compiler)
4949 public function macroForm (MacroNode $ node , PhpWriter $ writer )
5050 {
5151 if ($ node ->modifiers ) {
52- throw new CompileException (' Modifiers are not allowed here. ' );
52+ throw new CompileException (" Modifiers are not allowed in { { $ node -> name } } " );
5353 }
5454 if ($ node ->prefix ) {
5555 throw new CompileException ('Did you mean <form n:name=...> ? ' );
@@ -73,7 +73,7 @@ public function macroForm(MacroNode $node, PhpWriter $writer)
7373 public function macroFormContainer (MacroNode $ node , PhpWriter $ writer )
7474 {
7575 if ($ node ->modifiers ) {
76- throw new CompileException (' Modifiers are not allowed here. ' );
76+ throw new CompileException (" Modifiers are not allowed in { { $ node -> name } } " );
7777 }
7878 $ name = $ node ->tokenizer ->fetchWord ();
7979 if ($ name === FALSE ) {
@@ -92,7 +92,7 @@ public function macroFormContainer(MacroNode $node, PhpWriter $writer)
9292 public function macroLabel (MacroNode $ node , PhpWriter $ writer )
9393 {
9494 if ($ node ->modifiers ) {
95- throw new CompileException (' Modifiers are not allowed here. ' );
95+ throw new CompileException (" Modifiers are not allowed in { { $ node -> name } } " );
9696 }
9797 $ words = $ node ->tokenizer ->fetchWords ();
9898 if (!$ words ) {
@@ -127,7 +127,7 @@ public function macroLabelEnd(MacroNode $node, PhpWriter $writer)
127127 public function macroInput (MacroNode $ node , PhpWriter $ writer )
128128 {
129129 if ($ node ->modifiers ) {
130- throw new CompileException (' Modifiers are not allowed here. ' );
130+ throw new CompileException (" Modifiers are not allowed in { { $ node -> name } } " );
131131 }
132132 $ words = $ node ->tokenizer ->fetchWords ();
133133 if (!$ words ) {
@@ -217,7 +217,7 @@ public function macroNameEnd(MacroNode $node, PhpWriter $writer)
217217 public function macroInputError (MacroNode $ node , PhpWriter $ writer )
218218 {
219219 if ($ node ->modifiers ) {
220- throw new CompileException (' Modifiers are not allowed here. ' );
220+ throw new CompileException (" Modifiers are not allowed in { { $ node -> name } } " );
221221 }
222222 $ name = $ node ->tokenizer ->fetchWord ();
223223 if (!$ name ) {
0 commit comments