From 0777d0bc51fcf7ecff67521cfde1448cf08947b2 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 13 Jan 2021 16:50:59 -0500 Subject: Try to return make substitutions as single tokens --- bin/make.l | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/make.l b/bin/make.l index eee150b9..a2d63e5b 100644 --- a/bin/make.l +++ b/bin/make.l @@ -78,6 +78,11 @@ operator [:!]|:: "#"([^\\\n]|"\\"[^\n]|"\\\n")* { return Comment; } <*>{ + "$"("{"|"(")/[^$] { + depth++; + BEGIN(Variable); + yymore(); + } "$"("{"|"(") { depth++; BEGIN(Variable); @@ -86,7 +91,7 @@ operator [:!]|:: "$". { return Subst; } } { - "}"|")" { + [^${}()]*"}"|")" { if (!--depth) BEGIN(pop); return Subst; } -- cgit 1.4.1