Sure, thanks. On Tue, Jul 11 2023, Eli Zaretskii wrote: >> Date: Tue, 11 Jul 2023 08:30:51 +0800 >> From: Yang Yingchao via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> 1. get source file from >> >> 1. open it, and move to line 567, then we can see function >> `SysLogger_Start(void)` is not highlighted properly. >> >> `treesit-explore-mode` shows some error too: >> >> ``` >> (ERROR type: (primitive_type) >> (function_declarator declarator: (identifier) >> parameters: >> (parameter_list ( >> (parameter_declaration type: (primitive_type)) >> ))) >> >> ``` >> >> And when cusor is inside this function, and `treesit-beginning-of-defun` >> will move cusor to `SysLoggerMain()` which is actully the function >> before `SysLogger_Start()`. > > It's because of this: > > > #ifdef EXEC_BACKEND > switch ((sysloggerPid = syslogger_forkexec())) > #else > switch ((sysloggerPid = fork_process())) > #endif > > The 2 'switch' statements inside preprocessor conditions cause the > parser to fail. I'm not sure we can do anything with this, except > report this to the developers of the tree-sitter C grammar, but I CC > Yuan and Theo just in case they have some ideas. Regards, -- *Yang Yingchao*