From 1264a95e7c83610a6149ffed7f7fd189385207b3 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 8 Aug 2012 07:58:43 +0000 Subject: [PATCH] codetools: skip codetools comment git-svn-id: trunk@38201 - --- components/codetools/pascalreadertool.pas | 28 +++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/components/codetools/pascalreadertool.pas b/components/codetools/pascalreadertool.pas index 89979a6763..f2086d93f4 100644 --- a/components/codetools/pascalreadertool.pas +++ b/components/codetools/pascalreadertool.pas @@ -277,16 +277,30 @@ begin if IsCommentStartChar[Src[CommentStart]] then begin CurCommentPos:=CommentStart; case Src[CurCommentPos] of - '{': // pascal comment + '{': begin - CommentLvl:=1; inc(CurCommentPos); - while (CurCommentPos0) do begin - case Src[CurCommentPos] of - '{': if Scanner.NestedComments then inc(CommentLvl); - '}': dec(CommentLvl); - end; + if (CurCommentPos0) do begin + case Src[CurCommentPos] of + '{': if Scanner.NestedComments then inc(CommentLvl); + '}': dec(CommentLvl); + end; + inc(CurCommentPos); + end; end; end; '/': // Delphi comment