summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbscan <10503608+bscan@users.noreply.github.com>2023-10-16 21:34:51 -0400
committerbscan <10503608+bscan@users.noreply.github.com>2023-10-16 21:34:51 -0400
commit96884886a7fe9363692ea1f54f3aff74248f276a (patch)
treeb28a3c0e68d4470f09a6cd3550a99a6551ba870e
parentc4f968a9325d64d2e94726dd66bc01986ae000d2 (diff)
downloadPerlNavigator-96884886a7fe9363692ea1f54f3aff74248f276a.zip
Space between my and parens is optional
-rw-r--r--server/src/parser.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/parser.ts b/server/src/parser.ts
index b877d15..252b342 100644
--- a/server/src/parser.ts
+++ b/server/src/parser.ts
@@ -244,7 +244,7 @@ function look_ahead_signatures(state: ParserState): string[] {
}
}
let match;
- if ((match = stmt.match(/(?:^|{)\s*my\s+(\(\s*[\$@%]\w+\s*(?:,\s*[\$@%]\w+\s*)*\))\s*=\s*\@_/)) || // my ($foo, $bar) = @_
+ if ((match = stmt.match(/(?:^|{)\s*my\s*(\(\s*[\$@%]\w+\s*(?:,\s*[\$@%]\w+\s*)*\))\s*=\s*\@_/)) || // my ($foo, $bar) = @_
(match = stmt.match(/(?:^|{)\s*my\s+(\s*[\$@%]\w+\s*)=\s*shift\b/)) || // my $foo = shift
(match = stmt.match(/(?:^|{)\s*my\s*(\(\s*[\$@%]\w+\s*\))\s*=\s*shift\b/)) // my ($foo) = shift
) {