mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-01 08:57:05 +03:00
c70e6919c2
The names of the authors were retrieved from: git log -p --follow syntax/<name>.nanorc and from: git log -p --follow --all -- doc/nanorc.sample For some files the original author is unclear, or the file is/was too small to mention an author for.
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
## Syntax highlighting for AWK scripts.
|
|
|
|
## Original author: Donnie Berkholz
|
|
|
|
syntax awk "\.awk$"
|
|
header "^#!.*awk"
|
|
magic "awk script"
|
|
comment "#"
|
|
|
|
# Records.
|
|
color brightred "\$[0-9A-Za-z_!@#$*?-]+"
|
|
# Awk-set variables.
|
|
color red "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
|
|
color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
|
|
color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
|
|
# Function declarations and special patterns.
|
|
color brightgreen "\<(function|extension|BEGIN|END)\>"
|
|
# Operators.
|
|
color green "\{|\}|\(|\)|\;|\[|\]|\\|<|>|!|=|&|\+|-|\*|%|/|\?:|\^|\|"
|
|
# Flow control.
|
|
color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>"
|
|
color brightyellow "\<(break|continue|return)\>"
|
|
# I/O statements.
|
|
color brightgreen "\<(close|fflush|getline|next|nextfile|print|printf|system)\>"
|
|
# Standard functions.
|
|
color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>"
|
|
color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>"
|
|
color magenta "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>"
|
|
color magenta "\<(mktime|strftime|systime)\>"
|
|
color magenta "\<(and|compl|lshift|or|rshift|xor)\>"
|
|
color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>"
|
|
|
|
# Strings.
|
|
color brightyellow ""([^"\]|\\.)*""
|
|
# Comments.
|
|
color brightblue "(^|[[:blank:]])#.*"
|
|
|
|
# Trailing whitespace.
|
|
color ,green "[[:space:]]+$"
|