diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2017-06-19 10:42:37 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2017-06-19 10:43:08 -0400 |
commit | e084987b3ee273171d2d4ceda616ba481b1fb7d1 (patch) | |
tree | 199db027267d8234168bb390ed8194d6a12ef07e /src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-e084987b3ee273171d2d4ceda616ba481b1fb7d1.tar.gz lumina-e084987b3ee273171d2d4ceda616ba481b1fb7d1.tar.bz2 lumina-e084987b3ee273171d2d4ceda616ba481b1fb7d1.zip |
Added PHP rules and updated Javascript and Markdown rules
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax')
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax new file mode 100644 index 00000000..1aa906d4 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/php.syntax @@ -0,0 +1,49 @@ +# Syntax support file for the Lumina Text Editor +# =================================== +# PHP language support rules +# Written by Zackary Welch <zwelch@ixsystems.com> +# Released under the 2-clause BSD license +# =================================== + +{ + "meta": { + "name": "PHP", + "file_suffix": ["php"] + }, + "format": { + "line_wrap": false, + "highlight_whitespace_eol" : false + }, + "rules": [{ + "name": "keywords", + "words": ["private", "public", "class", "function", "const", "return", "if", "else", "bool", "abstract", "and", "as", "break", "case", "catch", "const", "do", "echo", "elseif", "default", "endif", "endfor", "final", "for", "foreach", "extends", "global", "include", "interface", "new", "or", "protected", "require", "static", "switch", "throw", "try", "use", "var", "while", "xor"], + "foreground": "colors/keyword" + }, + { + "name": "single-line comment", + "regex": "[//#][^\n]*", + "foreground": "colors/comment" + }, + { + "name": "multi-line comment", + "regex_start": "/\\*", + "regex_end": "\\*/", + "foreground": "colors/comment" + }, + { + "name": "numbers", + "regex": "\\b([0-9]+[\\.]?[0-9]?)+\\b", + "foreground": "colors/altkeyword" + }, + { + "name": "function names", + "regex": "\\b[A-Za-z0-9_]+(?=\\()", + "foreground": "colors/class" + }, + { + "name" : "text", + "regex": "\"[^\"\\\\]*(\\\\(.|\\n)[^\"\\\\]*)*\"|'[^'\\\\]*(\\\\(.|\\n)[^'\\\\]*)*'", + "foreground" : "colors/text" + } + ] +} |