Convertir FUNCTION a PROCEDURE, para mantener la compatibilidad con la forma en que VFP guarda los métodos
This commit is contained in:
@@ -20,6 +20,7 @@ Change History -------------------------------------------------------------
|
|||||||
2015/06/22 v1.19.46
|
2015/06/22 v1.19.46
|
||||||
- Bug Fix: set_UserValue() method causes error when trying to get information about another error and the VFP binary table can not be opened (ie, because corrupted memo)
|
- Bug Fix: set_UserValue() method causes error when trying to get information about another error and the VFP binary table can not be opened (ie, because corrupted memo)
|
||||||
- Feature: Added internal support for querying directory cfg information, with a new optional parameter, for API methods that require it (ie: get_Ext2FromExt, hasSupport*)
|
- Feature: Added internal support for querying directory cfg information, with a new optional parameter, for API methods that require it (ie: get_Ext2FromExt, hasSupport*)
|
||||||
|
- Feature: Convert FUNCTION to PROCEDURE for maintaining compatibility with the way that VFP save methods on binaries
|
||||||
|
|
||||||
|
|
||||||
2015/06/21 v1.19.45
|
2015/06/21 v1.19.45
|
||||||
|
|||||||
@@ -7995,11 +7995,13 @@ DEFINE CLASS c_conversor_prg_a_bin AS c_conversor_base
|
|||||||
AND NOT .lineIsOnlyCommentAndNoMetadata( @tcLine, @tc_Comentario )
|
AND NOT .lineIsOnlyCommentAndNoMetadata( @tcLine, @tc_Comentario )
|
||||||
|
|
||||||
DO CASE
|
DO CASE
|
||||||
CASE UPPER( LEFT( tcLine + ' ', 8 ) ) == C_ENDPROC + ' ' && Fin del PROCEDURE
|
CASE UPPER( LEFT( tcLine + ' ', 8 ) ) == 'ENDPROC ' ; && Fin del PROCEDURE
|
||||||
|
OR UPPER( LEFT( tcLine + ' ', 8 ) ) == 'ENDFUNC ' && Fin de la FUNCTION
|
||||||
|
|
||||||
tcProcedureAbierto = ''
|
tcProcedureAbierto = ''
|
||||||
EXIT
|
EXIT
|
||||||
|
|
||||||
CASE UPPER( LEFT( tcLine + ' ', 10 ) ) == C_ENDDEFINE + ' ' && Fin de bloque (ENDDEFINE) encontrado
|
CASE UPPER( LEFT( tcLine + ' ', 10 ) ) == 'ENDDEFINE ' && Fin de bloque (ENDDEFINE) encontrado
|
||||||
IF llEsProcedureDeClase
|
IF llEsProcedureDeClase
|
||||||
*ERROR 'Error de anidamiento de estructuras. Se esperaba ENDPROC y se encontr<74> ENDDEFINE en la clase ' ;
|
*ERROR 'Error de anidamiento de estructuras. Se esperaba ENDPROC y se encontr<74> ENDDEFINE en la clase ' ;
|
||||||
+ toClase._Nombre + ' (' + loProcedure._Nombre + ')' ;
|
+ toClase._Nombre + ' (' + loProcedure._Nombre + ')' ;
|
||||||
@@ -8871,6 +8873,25 @@ DEFINE CLASS c_conversor_prg_a_bin AS c_conversor_base
|
|||||||
tcProcedureAbierto = ALLTRIM( SUBSTR( tcLine, 11 ) )
|
tcProcedureAbierto = ALLTRIM( SUBSTR( tcLine, 11 ) )
|
||||||
.evaluateProcedureDefinition( @toClase, I, @tc_Comentario, tcProcedureAbierto, 'normal', @toObjeto )
|
.evaluateProcedureDefinition( @toClase, I, @tc_Comentario, tcProcedureAbierto, 'normal', @toObjeto )
|
||||||
|
|
||||||
|
CASE UPPER( LEFT( tcLine, 19 ) ) == 'PROTECTED FUNCTION '
|
||||||
|
*-- Estructura a reconocer: PROTECTED PROCEDURE nombre_del_procedimiento
|
||||||
|
llBloqueEncontrado = .T.
|
||||||
|
tcProcedureAbierto = ALLTRIM( SUBSTR( tcLine, 20 ) )
|
||||||
|
.evaluateProcedureDefinition( @toClase, I, @tc_Comentario, tcProcedureAbierto, 'protected', @toObjeto )
|
||||||
|
|
||||||
|
|
||||||
|
CASE UPPER( LEFT( tcLine, 16 ) ) == 'HIDDEN FUNCTION '
|
||||||
|
*-- Estructura a reconocer: HIDDEN FUNCTION nombre_del_procedimiento
|
||||||
|
llBloqueEncontrado = .T.
|
||||||
|
tcProcedureAbierto = ALLTRIM( SUBSTR( tcLine, 17 ) )
|
||||||
|
.evaluateProcedureDefinition( @toClase, I, @tc_Comentario, tcProcedureAbierto, 'hidden', @toObjeto )
|
||||||
|
|
||||||
|
CASE UPPER( LEFT( tcLine, 9 ) ) == 'FUNCTION '
|
||||||
|
*-- Estructura a reconocer: FUNCTION [objeto.]nombre_del_procedimiento
|
||||||
|
llBloqueEncontrado = .T.
|
||||||
|
tcProcedureAbierto = ALLTRIM( SUBSTR( tcLine, 10 ) )
|
||||||
|
.evaluateProcedureDefinition( @toClase, I, @tc_Comentario, tcProcedureAbierto, 'normal', @toObjeto )
|
||||||
|
|
||||||
ENDCASE
|
ENDCASE
|
||||||
|
|
||||||
IF llBloqueEncontrado
|
IF llBloqueEncontrado
|
||||||
|
|||||||
Reference in New Issue
Block a user