소스 검색

* adds additional "quote" checks to maybequoted function for various chars in names

git-svn-id: trunk@4792 -
Almindor 19 년 전
부모
커밋
2978e6661a
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      compiler/cutils.pas

+ 8 - 2
compiler/cutils.pas

@@ -808,8 +808,14 @@ uses
                  quoted:=true;
                  quoted:=true;
                  s1:=s1+s[i];
                  s1:=s1+s[i];
                end;
                end;
-             else
-               s1:=s1+s[i];
+             else begin
+               if s[i] in ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
+                           '{', '}', '''', ';', ':', '\', '`', '~'] then begin
+                 quoted:=True;
+                 s1:=s1 + s[i];
+               end else
+                 s1:=s1+s[i];
+             end;
            end;
            end;
          end;
          end;
         if quoted then
         if quoted then