Support top-level comments in SplitSource.php.
This commit is contained in:
parent
22289fe68b
commit
155d83c58f
@ -75,6 +75,7 @@ function split_file($file, $chunks, $undo) {
|
|||||||
$target_depth = 1 + $is_generated;
|
$target_depth = 1 + $is_generated;
|
||||||
$is_static = false;
|
$is_static = false;
|
||||||
$in_define = false;
|
$in_define = false;
|
||||||
|
$in_comment = false;
|
||||||
$current = '';
|
$current = '';
|
||||||
$common = '';
|
$common = '';
|
||||||
$functions = array();
|
$functions = array();
|
||||||
@ -113,6 +114,17 @@ function split_file($file, $chunks, $undo) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($in_comment && strpos($line, '*/') === 0) {
|
||||||
|
$in_comment = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (strpos($line, '/*') === 0) {
|
||||||
|
$in_comment = true;
|
||||||
|
}
|
||||||
|
if ($in_comment) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($depth !== $target_depth) {
|
if ($depth !== $target_depth) {
|
||||||
$common .= $line;
|
$common .= $line;
|
||||||
continue;
|
continue;
|
||||||
@ -285,7 +297,7 @@ function split_file($file, $chunks, $undo) {
|
|||||||
'[>](td_db[(][)]|get_td_db_impl[(])|TdDb[^A-Za-z]' => 'TdDb',
|
'[>](td_db[(][)]|get_td_db_impl[(])|TdDb[^A-Za-z]' => 'TdDb',
|
||||||
'TopDialogCategory|get_top_dialog_category' => 'TopDialogCategory',
|
'TopDialogCategory|get_top_dialog_category' => 'TopDialogCategory',
|
||||||
'top_dialog_manager[_(-][^.]|TopDialogManager' => 'TopDialogManager',
|
'top_dialog_manager[_(-][^.]|TopDialogManager' => 'TopDialogManager',
|
||||||
'updates_manager[_(-][^.]|UpdatesManager|get_difference[)]' => 'UpdatesManager',
|
'updates_manager[_(-][^.]|UpdatesManager|get_difference[)]|updateSentMessage|dummyUpdate' => 'UpdatesManager',
|
||||||
'WebPageId(Hash)?' => 'WebPageId',
|
'WebPageId(Hash)?' => 'WebPageId',
|
||||||
'web_pages_manager[_(-][^.]|WebPagesManager' => 'WebPagesManager');
|
'web_pages_manager[_(-][^.]|WebPagesManager' => 'WebPagesManager');
|
||||||
|
|
||||||
|
@ -522,8 +522,6 @@ class SaveAppLogQuery : public Td::ResultHandler {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*** Td ***/
|
|
||||||
/** Td queries **/
|
|
||||||
class TestQuery : public Td::ResultHandler {
|
class TestQuery : public Td::ResultHandler {
|
||||||
public:
|
public:
|
||||||
explicit TestQuery(uint64 request_id) : request_id_(request_id) {
|
explicit TestQuery(uint64 request_id) : request_id_(request_id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user