aboutsummaryrefslogtreecommitdiff
path: root/lua/lexers
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-08-16 22:24:18 +0200
committerEvan Gates <evan.gates@gmail.com>2022-06-15 13:02:16 -0600
commit6414762b32ed20b5c37fc3ca65f20ab03530f331 (patch)
tree9fc2fd2f6cda7bb66c01aaa8a62267606cd159d4 /lua/lexers
parent2e8c73b4882b4187f86c09ea7fcb2f5ca4ec792e (diff)
downloadvis-6414762b32ed20b5c37fc3ca65f20ab03530f331.tar.gz
vis-6414762b32ed20b5c37fc3ca65f20ab03530f331.tar.xz
Makefile lexer now supports multiple targets in single definition
Diffstat (limited to 'lua/lexers')
-rw-r--r--lua/lexers/makefile.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/lexers/makefile.lua b/lua/lexers/makefile.lua
index 1267249..aaf2dc0 100644
--- a/lua/lexers/makefile.lua
+++ b/lua/lexers/makefile.lua
@@ -72,7 +72,8 @@ local special_target = token(l.CONSTANT, l.word_match({
'.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.