* source/compiler/harbour.l
+ Added "as structure", "as stru", "as array of structure", "as array of stru"
* source/compiler/hbpcode.c
* Improved some logic in hb_StrongType()
* source/vm/hvm.c
! Corrected startup symbol when having to use Main() as per Ryszard.
* source/pp/pptable.c
+ Added the equivalent of:
#COMMANDS STRUCTURE <StruName> <Var1> AS <Type1> [, <VarN> AS <TypeN> ] => ;
STATIC __<StruName> := {|| IF( __<StruName> == NIL, , ) , HB_Structure( <"StruName">, { <"Var1"> [, <"VarN">] } )} ;;
DECLARE <StruName> <Var1> AS <Type1> [ <VarN> AS <TypeN> ] ;;
#TRANSLATE AS NEW <ClassName> => AS CLASS <StruName> := ( Eval( __<StruName> ), HB_Structure( <StruName> ) )
#TRANSLATE AS NEW <ClassName> => AS CLASS <ClassName> := <ClassName>():New()
* source/rtl/tclass.prg
+ Added Function HB_Structure() ( Fully Declared! ) This function is used internally, but may be freely called from Clipper level.
It Aceepts Parameter 1 Structure Name, and optional parameter 2, as array of structure variable names.
If called with 2nd parameter, returns NIL (just creates the new Structure), if called with just parameter 1, it returns
new instance of defined structure.
+ tests\teststru.prg
+ Added demo for new structure syntax
* source/compiler/harbour.y
- Removed few unneeded hb_strdup() from calls to hb_compClassFind()
+ Added auto addition of Method Declaration for the SET Function of a declared Var of a declared class.
* source/compiler/harbour.c
- Removed few unneeded hb_strdup() from calls to hb_compClassFind()
* source/compiler/harbour.l
+ Added "as class"
* source/compiler/harbour.y
! Fixed shift conflicts and reduce conflicts.
* Modified rules for syntax "AS Object ClassName" to "As Class ClassName"
* tests/testwarn.prg
! Corrected the #translate to reflect latest syntax
! Corrected syntax to use AS CLASS ClassName instead of AS OBJECT ClassName.
* include/hbvmpub.h
+ Added: #define HB_FS_FIRST ( ( HB_SYMBOLSCOPE ) 0x40 )
* source/compiler/genc.c
+ Added logic to add | HB_FS_FIRST to first defined symbol in a prg.
* source/vm/hvm.c
* Modified hb_vmProcessSymbols() to llok for HB_FS_FIRST for startup procedure instead of any first symbol.
* source/compiler/harbour.y
* Minor consilidation in AsType
*** I am aware of 6 reduce conflicts resulting from previous removal of FROM_CLASS, and am looking into it. ***
* tests/testwarn.prg
! Corrected the #translate to reflect latest syntax
* source/compiler/harbour.l
- Removed rule for "FROM CLASS"
+ Added "AS Obj" as an abrreviation for "AS Object"
* source/compiler/harbour.y
* Changed "AS Object FROM CLASS ClassName" to "As Object ClassName"
* tests/testwarn.prg
* Modified code to demonstrate new syntax for "As Object..."
* include/hbcomp.h
+ Added member pParamClasses to COMDECLARED
* Changed hb_comp_szClass to hb_comp_szFromClass
* source/compiler/harbour.y
* Changed hb_comp_szClass to hb_comp_szFromClass
* source/compiler/harbour.c
+ Added support for declared parameters of Functions/Methods AS Object FROM CLASS ...
* source/compiler/hbpcode.c
+ Added Strong Type checking for declared parameters of Functions/Methods AS Object FROM CLASS ...
* tests/testwarn.prg
+ Added code to demonstrate warnings for declared parameters of Functions/Methods AS Object FROM CLASS ...
* source/compiler/harbour.y
* source/compiler/harbour.c
* source/compiler/hbpcode.c
+ Added support for AS Array Of Objects FROM CLASS ClassName syntax and type checking.
* tests/testwarn.prg
+ Added code to demonstrate syntax and warnings for AS Array Of Objects FROM CLASS ClassName syntax and type checking.
* include/hbcomp.h
! Consoldated COMDECLARED and COMMETHOD into COMDECLARED
+ Added member pClass to COMDECLARED
+ Added member pLast to COMCLASS
* source/compiler/harbour.y
+ Added support for Methods/Datas of type Object of a declared Class.
* source/compiler/harbour.c
! Fixed bug in hb_compMethodAdd()
* source/compiler/hbpcode.c
+ Added Strong Type Checking to Objects syntax.
* include/hberrors.h
+ Added : "HB_COMP_WARN_MESSAGE_NOT_FOUND"
* source/compiler/hbgenerr.c
+ Added : "3Message \'%s\' not known in Class \'%s\'"
* tests/testwarn.prg
+ Added code to demonstrate syntax and warnings for OO Strong Type Checking.
* source/compiler/harbour.l
+ Added states DECLARE & OPTIONAL_
* Modified rules for "declare" and "optiona" to use states, and support abbreviations.
* Modified rules for "declare" to support backdated syntax DECLARE aVar[...]
* source/compiler/harbour.l
- Removed: not needed states
- Removed "class method" "class data"
+ Added rules for "declare""
* source/compiler/harbour.y
* Changed rules for DECLARE FUNCTION as per Ryszard suhhestion, New Sysntax is simply:
DECLARE FunName([...]) [As ...]
* Changed rules for DECLARE CLASS as per Ryszard suhhestion, New Sysntax is simply:
DECLARE ClassName MethodName([...]) [As ...] DataVar [As ...]
* source/compiler/harbour.c
! Minor correction to allow final declaration to override previous declaration of same function.
* tests/testwarn.prg
* Modified code to demonstrate syntax functions, classes and objects of a declared class declarations.
* source/compiler/harbour.y
+ Seperated the DECLARE... from Function, moved into a Declare, and Added Declare as type of Source.
! Added reset of hb_comp_iVarScope to DECLARE... to fix wrong "Statement not allowed outside of procedure or function"
* source/compiler/harbour.y
+ Seperated the DECLARE... from Function, moved into a Declare, and Added Declare as type of Source.
! Added reset of hb_comp_iVarScope to DECLARE... to fix wrong "Statement not allowed outside of procedure or function"
* source/compiler/hbgenerr.c
* Modified : "3Duplicate Declaration of %s \'%s\'" to accept 1st parameter type of redeclaration ( Function, Class, Method ).
* source/compiler/harbour.c
* Modified calls to hb_compGenWarning() to use additional parameter of redclaration type.
* source/compiler/harbour.l
! Fixed parse error when DO OPTIONAL WITH 1 or " or other non alpha charcaters
! Fixed parse error when FOR Var := OPTIONAL TO ...
* source/compiler/harbour.y
! Fixed GPF when using DECLARE CLASS and -w < 3
* source/compiler/harbour.c
! Fixed GPF when using DECLARE CLASS and -w < 3
* source/compiler/harbour.l
! Fixed parse error when DO OPTIONAL WITH ...
* Changed FROM to FROM CLASS in AS Obect FROM CLASS ... (fixed conflict of FROM with DO FROM ...)
* Changed AS ... ARRAY to AS ARRAY OF ...
* include/hbcomp.h
+ Added new structures COMCLASS and COMMETHOD
+ Added new element pClass to structure VAR
+ Added:
extern PCOMCLASS hb_compClassAdd( char * );
extern PCOMCLASS hb_compClassFind( char * );
extern PCOMMETHOD hb_compMethodAdd( PCOMCLASS pClass, char * );
extern PCOMMETHOD hb_compMethodFind( PCOMCLASS pClass, char * );
* source/compiler/harbour.c
+ Added:
PCOMCLASS hb_compClassAdd( char * );
PCOMCLASS hb_compClassFind( char * );
PCOMMETHOD hb_compMethodAdd( PCOMCLASS pClass, char * );
PCOMMETHOD hb_compMethodFind( PCOMCLASS pClass, char * );
* Modified hb_compVariableAdd() to process params of declared class methods.
* source/compiler/harbour.l
+ Added tokens CLASSMETHOD CLASSDATA and FROMCLASS
* source/compiler/harbour.y
+ Added support for class declaration syntax:
DECLARE CLASS ClassName HAS Method MethodName( ... ) As ... HAS Data PropertyName ...
+ Added support for declaration of Object of a sdeclared class sysntax:
DECLARE oObjectVar AS Object FROM ClassName
* source/compiler/hbpcode.c
+ Started support for object methods and properties type checking.
* tests/testwarn.prg
+ Added code to demonstrate declarion of classes and objects of a declared class.
* source/compiler/harbour.l
- Removed un used token DECLARE_
* source/compiler/harbour.y
! Fixed warning about conflict
! Verified all calls to hb_compVariableAdd() to use hb_comp_cVarType (and VT_OFFSET_* constants) as 2nd parameter
+ Added rules to support syntax of declartion of variable by reference parameter.
* include/hbcomp.h
+ Added :
#define VT_OFFSET_BYREF 60
#define VT_OFFSET_VARIANT 90
#define VT_OFFSET_OPTIONAL 90
* source/compiler/harbour.c
* Minor cleanup in hb_compVariableAdd()
* source/compiler/hbpcode.c
* Modified hb_compStrongType() to use VT_OFFSET_* constants.
* source/compiler/hbgenerr.c
* Changed "number" to "#" in HB_COMP_WARN_PARAM_TYPE message.
* tests/testwarn.prg
+ Added code to demonstrate new "Declared Refernced Paramater" syntax:
DECLARE FRead( nHandle As Num, @cBufferVar As Char, nBytes As Num ) AS Num
* source/compiler/harbour.l
+ Added token "optional"
* source/compiler/harbour.y
+ Added token "optional", DecParam, DecParamList, OptParams.
+ Added support for optional parameters syntax in declared functions.
* source/compiler/harbour.c
+ Added logic in hb_compVariableAdd() to deal with optional parameters of declared functions.
* source/compiler/hbpcode.c
+ Added logic in hb_compStrongType() to deal with optional parameters of declared functions.
* tests/testwarn.prg
+ Added code to demonstrate usage and warnings of optional parameters in declared functions.