| ## Syntax highlighting for Guile Scheme. | |
| ## Original authors: Mark Oteiza and Benno Schulenberg | |
| ## License: GPL version 3 or newer | |
| syntax guile "\.(scm|sld|sls|ss)$" | |
| header "^#!.*guile" | |
| comment ";" | |
| # Basic syntax | |
| color lightgreen "\<((and|begin|case|cond|do|else|if|lambda|let(rec)?|or|quote|unless|when)\>|let\*|set!)" | |
| # Basic procedures | |
| color lightcyan "\<((append|apply|c[ad]{1,4}r|cons|display|for-each|list|map|newline)\>|reverse(\>|!)|set-c[ad]r!)" | |
| color lightcyan "\<(boolean|char(-ci)?[<>]?=?|complex|eqv?|even|integer|list|nan|negative|null|number|odd|pair|positive|rational|real|string|symbol|vector|zero)\?" | |
| color lightcyan "\<(abs|a?(cos|sin|tan)|ceiling|exp|floor|max|min|modulo|not|random|round|quotient|sqrt|square|truncate)\>" | |
| # Defining things | |
| color brightgreen "\<define(-macro|-module|-public|-syntax)?\>" | |
| # Quoted symbols | |
| color lightyellow "'(\w|[!β$%&*+/:ββ<=>?@^_~])(\w|[!β$%&*+/:ββ<=>?@^_~.0-9-])*" | |
| # Characters | |
| color brightmagenta "#\\(.|\w+)" | |
| # Booleans | |
| color brightred "#(t|true|f|false)\>" | |
| # Keywords | |
| color lagoon "#?:(\w|[?-])+" | |
| # Strings | |
| color yellow start="^[[:blank:]]*"([^"\]|\\.)*$" end="(^|[^\]|[^\]\\\\)"" | |
| color yellow ""([^"\]|\\.)*"" | |
| # Comments | |
| color italic,#aaa "(^|[[:blank:]]);.*" | |