mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Closure operator now behaves as default argument operator, documentation.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@965 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -131,7 +131,7 @@ function highlight_script($code) {
|
||||
while(strlen($code)) {
|
||||
if (preg_match("@^<[^>]+>@",$code, $matches)) {
|
||||
$ret .= $matches[0]; // plain tag
|
||||
} else if (preg_match("@^(if|then|else|for( each)?|in(?= )|do|div|mod|and|or|xor|not|rgb|rgba|from|to)\b(?!:)@",$code, $matches)) {
|
||||
} else if (preg_match("@^(if|then|else|for( each)?|in(?= )|do|div|mod|and|or|xor|not|rgb|rgba|from|to|min|max)\b(?!:)@",$code, $matches)) {
|
||||
$ret .= "<span class='hl-kw'>" . $matches[0] . "</span>";
|
||||
} else if (preg_match("@^(include file:)(.*)@",$code, $matches)) {
|
||||
$ret .= "<span class='hl-key'>" . $matches[1] . "</span>" . $matches[2];
|
||||
@@ -150,7 +150,7 @@ function highlight_script($code) {
|
||||
if ($matches[2] == '{') $string .= 's';
|
||||
} else if (preg_match("@^\\#.*@",$code, $matches)) {
|
||||
$ret .= "<span class='hl-comment'>" . $matches[0] . "</span>";
|
||||
} else if (preg_match("@^([-+*/=!.]|<|>)+|^:=@",$code, $matches)) {
|
||||
} else if (preg_match("@^([-+*/=!.\@]|<|>)+|^:=@",$code, $matches)) {
|
||||
$ret .= "<span class='hl-op'>" . $matches[0] . "</span>";
|
||||
} else if (preg_match("@^([}]|[\\(\\)\\[\\]{,]+)@",$code, $matches)) {
|
||||
$ret .= "<span class='hl-paren'>" . $matches[0] . "</span>";
|
||||
|
||||
Reference in New Issue
Block a user