Skip to content

Commit

Permalink
Merge pull request #3776 from rlaverde/fix-highligth-decorators
Browse files Browse the repository at this point in the history
Improve highlighter decorator regexp
  • Loading branch information
ccordoba12 authored Dec 2, 2016
2 parents 10df073 + dc76b39 commit 2005cd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spyder/utils/syntaxhighlighters.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ def make_python_patterns(additional_keywords=[], additional_builtins=[]):
kw = r"\b" + any("keyword", kwlist) + r"\b"
builtin = r"([^.'\"\\#]\b|^)" + any("builtin", builtinlist) + r"\b"
comment = any("comment", [r"#[^\n]*"])
instance = any("instance", [r"\bself\b",r"^\s*@[a-zA-Z.]*"])
instance = any("instance", [r"\bself\b",
(r"^\s*@([a-zA-Z_][a-zA-Z0-9_]*)"
r"(.[a-zA-Z_][a-zA-Z0-9_]*)*")])
number = any("number",
[r"\b[+-]?[0-9]+[lLjJ]?\b",
r"\b[+-]?0[xX][0-9A-Fa-f]+[lL]?\b",
Expand Down

0 comments on commit 2005cd2

Please sign in to comment.