Skip to content

Commit

Permalink
Don't treat some keywords as PHP type.
Browse files Browse the repository at this point in the history
  • Loading branch information
ssigwart committed Oct 27, 2019
1 parent 49826de commit 1c7bf53
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/udl/skel/PHP/pylib/lang_php.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c7bf53

Please sign in to comment.