vis-master/977-makefile-multiple-targets.patch

23 lines
862 B
Diff

From 880acf5d42d1844a10fa3397961a4e02700ad4af Mon Sep 17 00:00:00 2001
From: Aki <please@ignore.pl>
Date: Mon, 16 Aug 2021 22:24:18 +0200
Subject: [PATCH 1/2] Makefile lexer now supports multiple targets in single
definition
---
lua/lexers/makefile.lua | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/lua/lexers/makefile.lua
+++ b/lua/lexers/makefile.lua
@@ -72,7 +72,8 @@ local special_target = token(l.CONSTANT,
'.SILENT', '.EXPORT_ALL_VARIABLES', '.NOTPARALLEL', '.ONESHELL', '.POSIX'
}, '.'))
local normal_target = token('target', (l.any - l.space - S(':#='))^1)
-local target = l.starts_line((special_target + normal_target) * ws^0 *
+local target_list = normal_target * (ws * normal_target)^0
+local target = l.starts_line((special_target + target_list) * ws^0 *
#(':' * -P('=')))
-- Identifiers.