summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parse.y b/src/parse.y
index e8533e092..1c0170ac9 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -4729,6 +4729,11 @@ parser_yylex(parser_state *p)
switch (c) {
case '_': /* $_: last read line string */
c = nextc(p);
+ if (c != -1 && identchar(c)) { /* if there is more after _ it is a variable */
+ tokadd(p, '$');
+ tokadd(p, c);
+ break;
+ }
pushback(p, c);
c = '_';
/* fall through */