Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
10e93a6d
Commit
10e93a6d
authored
Dec 31, 2012
by
Ned Deily
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #14958: backport to 2.7.x from 3.3 (patch by Roger Serwy)
parent
cef2006e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Lib/idlelib/ColorDelegator.py
Lib/idlelib/ColorDelegator.py
+5
-4
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/idlelib/ColorDelegator.py
View file @
10e93a6d
...
@@ -20,10 +20,11 @@ def make_pat():
...
@@ -20,10 +20,11 @@ def make_pat():
# 1st 'file' colorized normal, 2nd as builtin, 3rd as string
# 1st 'file' colorized normal, 2nd as builtin, 3rd as string
builtin
=
r"([^.'\"\\#]\b|^)"
+
any
(
"BUILTIN"
,
builtinlist
)
+
r"\b"
builtin
=
r"([^.'\"\\#]\b|^)"
+
any
(
"BUILTIN"
,
builtinlist
)
+
r"\b"
comment
=
any
(
"COMMENT"
,
[
r"#[^\n]*"
])
comment
=
any
(
"COMMENT"
,
[
r"#[^\n]*"
])
sqstring
=
r"(\b[rRuU])?'[^'\\\n]*(\\.[^'\\\n]*)*'?"
stringprefix
=
r"(\br|u|ur|R|U|UR|Ur|uR|b|B|br|Br|bR|BR)?"
dqstring
=
r'(\b[rRuU])?"[^"\\\n]*(\\.[^"\\\n]*)*"?'
sqstring
=
stringprefix
+
r"'[^'\\\n]*(\\.[^'\\\n]*)*'?"
sq3string
=
r"(\b[rRuU])?'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
dqstring
=
stringprefix
+
r'"[^"\\\n]*(\\.[^"\\\n]*)*"?'
dq3string
=
r'(\b[rRuU])?"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?'
sq3string
=
stringprefix
+
r"'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
dq3string
=
stringprefix
+
r'"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?'
string
=
any
(
"STRING"
,
[
sq3string
,
dq3string
,
sqstring
,
dqstring
])
string
=
any
(
"STRING"
,
[
sq3string
,
dq3string
,
sqstring
,
dqstring
])
return
kw
+
"|"
+
builtin
+
"|"
+
comment
+
"|"
+
string
+
\
return
kw
+
"|"
+
builtin
+
"|"
+
comment
+
"|"
+
string
+
\
"|"
+
any
(
"SYNC"
,
[
r"\n"
])
"|"
+
any
(
"SYNC"
,
[
r"\n"
])
...
...
Misc/NEWS
View file @
10e93a6d
...
@@ -430,6 +430,9 @@ Library
...
@@ -430,6 +430,9 @@ Library
-
Issue
#
12157
:
Make
pool
.
map
()
empty
iterables
correctly
.
Initial
-
Issue
#
12157
:
Make
pool
.
map
()
empty
iterables
correctly
.
Initial
patch
by
mouad
.
patch
by
mouad
.
-
Issue
#
14958
:
Change
IDLE
systax
highlighting
to
recognize
all
string
and
byte
literals
currently
supported
in
Python
2.7
.
-
Issue
#
14962
:
Update
text
coloring
in
IDLE
shell
window
after
changing
-
Issue
#
14962
:
Update
text
coloring
in
IDLE
shell
window
after
changing
options
.
Patch
by
Roger
Serwy
.
options
.
Patch
by
Roger
Serwy
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment