summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-13 16:50:59 -0500
committerJune McEnroe <june@causal.agency>2021-01-13 16:50:59 -0500
commitcb9cbf8e2fd008f49fa71631669511fa7c71eb03 (patch)
tree133cb95d0240fe5f1642855cc8c8cb2301a8a2a8
parentShorten hilex class names (diff)
downloadsrc-cb9cbf8e2fd008f49fa71631669511fa7c71eb03.tar.gz
src-cb9cbf8e2fd008f49fa71631669511fa7c71eb03.zip
Try to return make substitutions as single tokens
Diffstat (limited to '')
-rw-r--r--bin/make.l7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/make.l b/bin/make.l
index d8c7071f..30a0621f 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; }
 }
 <Variable>{
-	"}"|")" {
+	[^${}()]*"}"|")" {
 		if (!--depth) BEGIN(pop);
 		return Subst;
 	}