diff --git a/cpp.nanorc b/cpp.nanorc index f59c38e..4d05dc5 100644 --- a/cpp.nanorc +++ b/cpp.nanorc @@ -15,10 +15,15 @@ color white ".*" # Function or method calls color cyan "\w+\(" -# Function/method names on definitions -color green "@\w+" -color green "^[[:blank:]]+(\w+ )?\w+\(.*(\)| \{)$" +# Function definition +color green "(^|[[:blank:]])(w+ )?\w+\(.*(\)| \{)$" +# Function/method names on definitions +color green "^[[:space:]]+(\w+ )?\w+\(.*(\)| \{)$" +color green "[[:blank:]][a-zA-Z0-9_]+\(([a-zA-Z0-9_]+ &+ ?[a-zA-Z0-9_]+,? ?)*\);" +color green "[a-zA-Z0-9_]+::[a-zA-Z0-9_]+\(([a-zA-Z0-9_]+ &+ ?[a-zA-Z0-9_]+,? ?)*\)($| ?\{)" + +# Re-whitening function and method types color white "^[[:blank:]]+[a-zA-Z_0-9]+ " # Parameters inside method definitions @@ -26,17 +31,17 @@ color orange "\([a-zA-Z_0-9,= '#:&]+\)( *\{|$)" color white " \([a-zA-Z_0-9,= :&]+\)( *\{|$)" # Re-whitening parameter types -color white "(\(|, )[a-zA-Z:]+ " +color white "(\(|, )[a-zA-Z0-9:_]+ " # Static method calls color cyan "(^|[[:blank:]]|,|\(|=|\||&)[a-zA-Z_0-9]+::" color white "::[a-zA-Z_0-9]+(::|$)" # Statements -color brightcyan "\<(class|struct|from|new|const|return|for|while|if|elseif|else|throw|continue|break|try|catch|switch|case|static|do)\>" +color brightcyan "\<(class|struct|from|new|const|return|for|while|if|elseif|else|throw|continue|break|try|catch|switch|case|static|do|virtual)\>" # Special statements -color cyan "(public:|protected:|private:)" +color cyan "\<(public|protected|private)\>:?" # Special values color magenta "\<(true|false|null)\>"