浏览代码

Fix inability for interrogate to parse /*c*//* and /*c*///

rdb 10 年之前
父节点
当前提交
de715b5a0e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      dtool/src/cppparser/cppPreprocessor.cxx

+ 2 - 1
dtool/src/cppparser/cppPreprocessor.cxx

@@ -979,13 +979,14 @@ skip_whitespace(int c) {
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 skip_comment(int c) {
-  if (c == '/') {
+  while (c == '/') {
     int next_c = get();
     if (next_c == '*') {
       _last_cpp_comment = false;
       c = skip_c_comment(get());
     } else if (next_c == '/') {
       c = skip_cpp_comment(get());
+      break;
     } else {
       _last_cpp_comment = false;
       unget(next_c);