syntax: awk: rewrite a regex more densely, and add the missing ~ operator

Also, improve the comment.
This commit is contained in:
Benno Schulenberg 2024-07-18 16:10:12 +02:00
parent 7c86c1a185
commit d7e8665782
1 changed files with 2 additions and 2 deletions

View File

@ -15,8 +15,8 @@ color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>" color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
# Function declarations and special patterns. # Function declarations and special patterns.
color brightgreen "\<(function|extension|BEGIN|END)\>" color brightgreen "\<(function|extension|BEGIN|END)\>"
# Operators. # Operators and brackets/braces/slashes/parentheses.
color green "\{|\}|\(|\)|\;|\[|\]|\\|<|>|!|=|&|\+|-|\*|%|/|\?|:|\^|\|" color green "[][!%&()*+/:;<=>?\^{|}~-]"
# Flow control. # Flow control.
color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>" color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>"
color brightyellow "\<(break|continue|return)\>" color brightyellow "\<(break|continue|return)\>"