From c4f0d854af916d3581e50fae07363140cd65aaa2 Mon Sep 17 00:00:00 2001 From: fdbozzo Date: Sun, 9 Nov 2014 18:22:31 +0100 Subject: [PATCH] =?UTF-8?q?Changeset:=20470=20fdbozzo=20-=2009/11/2014=201?= =?UTF-8?q?7:05:15:=20-=20Optimizaci=C3=B3n:=20Excluyo=20las=20l=C3=ADneas?= =?UTF-8?q?=20que=20solo=20son=20comentarios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- foxbin2prg.prg | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/foxbin2prg.prg b/foxbin2prg.prg index 2d009c6..b6f93e9 100644 --- a/foxbin2prg.prg +++ b/foxbin2prg.prg @@ -2782,16 +2782,22 @@ DEFINE CLASS c_conversor_base AS SESSION LPARAMETERS taCodeLines, I LOCAL lcPrevLine, llIsContinuation + *-- Analizo la línea anterior para saber si termina con ";" o "," y la actual es continuación IF I > 1 lcPrevLine = taCodeLines(I-1) ELSE lcPrevLine = '' ENDIF - .get_SeparatedLineAndComment( @lcPrevLine ) + + THIS.get_SeparatedLineAndComment( @lcPrevLine ) + IF INLIST( RIGHT( lcPrevLine,1 ), ';', ',' ) && Esta línea es continuación de la anterior llIsContinuation = .T. ENDIF + + RELEASE lcPrevLine + RETURN llIsContinuation ENDPROC @@ -3265,6 +3271,9 @@ DEFINE CLASS c_conversor_base AS SESSION lcLine = LTRIM( STRTRAN( STRTRAN( CHRTRAN( taCodeLines(I), CHR(9), ' ' ), ' ', ' ' ), ' ', ' ' ) ) IF .lineIsOnlyCommentAndNoMetadata( @lcLine ) + *-- Optimización: Excluyo las líneas que solo son comentarios + taLineasExclusion(I) = .T. + *-- LOOP ENDIF