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
commit0777d0bc51fcf7ecff67521cfde1448cf08947b2 (patch)
tree579ce592b3539f497f4e14e2d20df7913de2d474
parentShorten hilex class names (diff)
downloadsrc-0777d0bc51fcf7ecff67521cfde1448cf08947b2.tar.gz
src-0777d0bc51fcf7ecff67521cfde1448cf08947b2.zip
Try to return make substitutions as single tokens
-rw-r--r--bin/make.l7
1 files changed, 6 insertions, 1 deletions
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; }
 }
 <Variable>{
-	"}"|")" {
+	[^${}()]*"}"|")" {
 		if (!--depth) BEGIN(pop);
 		return Subst;
 	}