Skip to content

Commit 38d812d

Browse files
committed
Consistently use "method" instead of "function" in errors
1 parent 0337e08 commit 38d812d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/php/lang/ast/syntax/php/CompactMethods.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
*/
2929
class CompactMethods implements Extension {
3030

31-
public function setup($parser, $emitter) {
32-
$parser->body('fn', function($parse, &$body, $annotations, $modifiers) {
31+
public function setup($language, $emitter) {
32+
$language->body('fn', function($parse, &$body, $annotations, $modifiers) {
3333
$line= $parse->token->line;
3434
$comment= $parse->comment;
3535
$parse->comment= null;
@@ -44,9 +44,9 @@ public function setup($parser, $emitter) {
4444
$parse->forward();
4545
$signature= $this->signature($parse);
4646

47-
$parse->expecting('=>', 'compact function');
47+
$parse->expecting('=>', 'compact method');
4848
$return= new ReturnStatement($this->expression($parse, 0), $parse->token->line);
49-
$parse->expecting(';', 'compact function');
49+
$parse->expecting(';', 'compact method');
5050

5151
$body[$lookup]= new Method($modifiers, $name, $signature, [$return], $annotations, $comment, $line);
5252
});

0 commit comments

Comments
 (0)