#356 switch 문법 개선 ('@break@case...' => break; case...)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4342 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
bnu 2008-07-09 13:25:05 +00:00
parent b0cd9370c6
commit cc7622fefc

View file

@ -201,6 +201,9 @@
}
} elseif(substr($code, 0, 4) == 'case') {
$suffix = ':';
} elseif(substr($code, 0, 10) == 'break@case') {
$code = 'break; case'.substr($code, 10);
$suffix = ':';
}
$output = preg_replace('/\$([a-zA-Z0-9\_\-]+)/i', '$__Context->\\1', $code.$suffix);
break;