syntax: python: add 'async', 'await', and 'nonlocal' as keywords

A list of keywords can be obtained from `keyword.kwlist`.

Signed-off-by: Benjamin Mintz <bmintz@protonmail.com>
master
Benjamin Mintz 2017-12-10 01:46:02 -06:00 committed by Benno Schulenberg
parent eb937f81fa
commit fbac4505ce
1 changed files with 4 additions and 2 deletions

View File

@ -9,8 +9,10 @@ comment "#"
# Function definitions.
icolor brightblue "def [0-9A-Z_]+"
# Keywords.
color brightcyan "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from)\>"
color brightcyan "\<(global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>"
color brightcyan "\<(and|as|assert|async|await|break|class|continue)\>"
color brightcyan "\<(def|del|elif|else|except|exec|finally|for|from)\>"
color brightcyan "\<(global|if|import|in|is|lambda|nonlocal|not|or)\>"
color brightcyan "\<(pass|print|raise|return|try|while|with|yield)\>"
# Single-quoted strings.
color brightgreen "'([^'\]|\\.)+'"