From e11457fc7daa09c509538e3f12ff8506cce24dd2 Mon Sep 17 00:00:00 2001 From: Michael Francis Date: Mon, 11 Dec 2017 02:51:52 -0500 Subject: [PATCH 2/2] syntax: php: color keywords differently than strings and use explicit range patterns for function and variable names Signed-off-by: Michael Francis --- syntax/php.nanorc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/syntax/php.nanorc b/syntax/php.nanorc index 3478b2a7..da47144d 100644 --- a/syntax/php.nanorc +++ b/syntax/php.nanorc @@ -8,18 +8,18 @@ comment "//" color brightgreen "(<\?(php)?|\?>)" # Function names. -icolor white "\<[a-z_][a-z0-9_]*\(" +color white "\<[A-Za-z_][A-Za-z_0-9]*\(" # Variable names. -icolor cyan "\$[a-z_][a-z0-9_]*" +color cyan "\$[A-Za-z_][A-Za-z_0-9]*" # Types. color green "\<(array|bool|callable|const|float|global|int|object|string|var)\>" # Directives and structure. -color brightyellow "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>" -color brightyellow "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>" +color brightcyan "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>" +color brightcyan "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>" # Operators. -color brightyellow "\<(and|or|xor)\>" +color brightcyan "\<(and|or|xor)\>" # Control flow. color magenta "\<(break|continue|goto|return)\>" -- 2.14.1