From 1c7bf5301d730e12312566b9b65a9632b5dce007 Mon Sep 17 00:00:00 2001 From: Stephen Sigwart Date: Sun, 27 Oct 2019 00:21:01 -0400 Subject: [PATCH] Don't treat some keywords as PHP type. --- src/udl/skel/PHP/pylib/lang_php.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/udl/skel/PHP/pylib/lang_php.py b/src/udl/skel/PHP/pylib/lang_php.py index f97d19463a..4e7ba5cfb9 100644 --- a/src/udl/skel/PHP/pylib/lang_php.py +++ b/src/udl/skel/PHP/pylib/lang_php.py @@ -3240,6 +3240,11 @@ def _addCodePiece(self, newstate=S_DEFAULT, varnames=None): pos += 1 firstStyle = styles[pos] likelyAttribute = True + # Make sure it's not a keyword + if likelyAttribute and firstStyle == self.PHP_WORD: + keyword = text[pos].lower() + if keyword == "const" or keyword == "function": + likelyAttribute = False attributeType = None if likelyAttribute: # Eat optional type hint