Bug 417379

Summary: ifeq sequence highlighted invalid
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: fclushio
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nibgonz
Priority: NOR    
Version First Reported In: 5.67.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.68.0
Sentry Crash Report:
Attachments: Invalid highlight

Description fclushio 2020-02-10 12:51:19 UTC
Created attachment 125818 [details]
Invalid highlight

error_type := 0
check:
ifeq ($(error_type),0)
else ifeq ($(error_type),1)
else ifeq ($(error_type),2)
else ifeq ($(error_type),3)
endif

Such construction is highlighted as invalid though it is working for GNU Make 4.0.
https://www.gnu.org/software/make/manual/html_node/Conditional-Syntax.html

conditional-directive-one
text-if-one-is-true
else conditional-directive-two
text-if-two-is-true
else
text-if-one-and-two-are-false
endif

Linux u18p 4.15.0-74-generic #84-Ubuntu 
Qt Creator 4.5.2
Comment 1 Christoph Cullmann 2020-02-12 11:14:40 UTC
Git commit 86e132a3a829f9c07dd7bf0e483440f92e1c6340 by Christoph Cullmann, on behalf of Nibaldo González.
Committed on 12/02/2020 at 11:14.
Pushed by cullmann into branch 'master'.

Makefile highlight: fix variable names in "else" conditionals

Summary:
FIXED-IN: 5.68.0

Allow highlighting variables in "else" conditionals, for example: `else ifdef foo` or `else ifeq (bar, foo)`.

Previously, these (bar and foo) were highlighted as "Error".

Reviewers: #framework_syntax_highlighting, dhaumann, cullmann

Reviewed By: #framework_syntax_highlighting, cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D27343

M  +17   -0    autotests/folding/Makefile.fold
M  +17   -0    autotests/html/Makefile.html
M  +17   -0    autotests/input/Makefile
M  +17   -0    autotests/reference/Makefile.ref
M  +10   -4    data/syntax/makefile.xml

https://commits.kde.org/syntax-highlighting/86e132a3a829f9c07dd7bf0e483440f92e1c6340