forked from scopatz/nanorc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp.nanorc
78 lines (52 loc) · 1.38 KB
/
php.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
## Here is an example for PHP
syntax "php" "\.php[2345s~]?$" "module" "inc"
## Types
color brightred "\<(var|float|global|double|bool|char|int|enum|const)\>"
## Structure
color green "\<(class|new|private|public|protected|function)\>"
## Control flow
color brightyellow "\<(goto|continue|break|return)\>"
####
## Functions, Loops, If Else statements
####
## Anything before a (
color brightgreen "\<[a-zA-Z_0-9]*\("
##
color brightred "\<(for|foreach|if|while|do|else|elseif|case|default|switch)\>"
## Comparison Operators and Logical Operators
color brightyellow "[,()]" "==" "!=" "<=" ">=" "<" ">" "&&" "\||" "!"
color brightyellow " as " " => "
####
## Variables
####
## Anything starting with $
color magenta "\$[a-zA-Z_0-9]*"
## Brackets as used in arrays
color brightmagenta "(\[)|(\])"
## Anything starting with ->
color magenta "\->[a-zA-Z_0-9]*"
## =
color brightmagenta " = "
## ->
color brightmagenta "->"
## ++ and -- Operator
color brightmagenta "\++" "\--"
## Strings
color white ""(\.|[^"])*"" "'(\.|[^'])*'"
## HTML
color cyan start="<[a-zA-Z]" end="[>|\'\"]"
color cyan start="</[a-zA-Z]" end=">"
## Brackets
color brightred "[{}]"
## PHP Tags
color brightyellow "(<\?(php)?|\?>)"
## ;
color brightyellow ";"
####
## Comments
####
color blue "//.*"
color blue start="/\*" end="\*/"
color brightblue start="/\*\*" end="\*/"
## Trailing whitespace
color ,red "[[:space:]]+$"