Commit Graph

139 Commits

Author SHA1 Message Date
Vizit0r
51a015cbc5 1) fix of OPENARRAYOFU16 and OPENARRAYOFS16 declarations (#205)
2) DynArray "out of range" errors extended, now included info about curr index and array length
3) uPSUtils - takilng ansi string length from 0 index - changed to correct Length() calling.
4) added names forming for dynarrays when compiling.
2019-08-20 07:24:22 +02:00
Martijn Laan
bcf0f1b1b7 Fix warnings. Again, don't know exactly which version introduced each warning, kept it at Tokyo. 2019-02-03 14:06:51 +01:00
Martijn Laan
b624250b09 Added OnUseRegProc which is called once when a function added with Add(Delphi)Function is used by the script. 2018-12-19 22:54:28 +01:00
Martijn Laan
e4f2e63a47 Add 'AnyMethod' type which can be used to declare functions accepting any type of procedure. 2018-12-16 17:17:32 +01:00
Martijn Laan
7f3720701f Improved attribute support. Made GetString available outside the unit. 2018-09-03 20:59:24 +02:00
Martijn Laan
4b310a0fe3 Fix CopyVariantContents' btwidechar support. 2018-03-24 22:02:48 +01:00
Rey
69281ba739 Add support for 'array of _Enum_Type_' types for registered methods. (#160)
This will also add support for 'array of Boolean' type, as Boolean considered as enum in pascal script.
2017-10-01 22:53:15 +02:00
iferoc
7f43c66501 Pull request for #141 (#142)
Pull request for issue #141 - division of variant variables should return real (with PS_DELHIDIV compiler option)
2016-11-01 13:11:01 +01:00
Uwe Schuster
57d7291d92 Fix for #122
- Fixed case of registered symbols using the case in Delphi sources
- Fixed formatting in method signatures
- put registration across multiple lines onto one line

    "...GAMONSERV'
     +'ER )');"

    -> "...gamOnServer)');"
2016-05-13 14:34:11 +02:00
Carlo Kok
69fe88d559 Merge pull request #115 from eferley/ef_fix_upscompiler_addclass
Allow TPSPascalCompiler.AddClass to adjust InheritsFrom
2015-10-27 17:13:46 +01:00
eferley
da476ac4ca Make Exception messsages more useful for TPSCompileTimeClass.SetDefaultPropery 2015-10-26 15:13:28 +01:00
eferley
ccf76308bd Allow TPSPascalCompiler.AddClass re-registration of a class (if AllowDuplicateRegister) to adjust InheritsFrom instead of adding duplicate class registration 2015-10-26 14:30:57 +01:00
Martijn Laan
db0d6f5211 Added VarIsClear on Delphi 7 and up. Might also be available under Delphi 6 but not sure. 2014-11-12 14:52:49 +01:00
Lewin
0386f8f05a Fixed warnings showing row/column number as zero in some cases 2014-07-07 02:18:44 +10:00
Carlo Kok
70b4e1a851 Merge pull request #81 from velter/patch-9
Compiler bug in const arrays
2014-06-25 18:17:31 +02:00
Carlo Kok
390ee15ad1 Merge pull request #82 from velter/patch-8
Proposal to prevent duplicate definition
2014-06-25 18:16:54 +02:00
Frédéric Hannes
df155c4640 Minor tweak in compiler 2014-06-11 19:47:12 +02:00
velter
5967ab113b Update Duplicate definition change 2014-05-27 16:05:00 +02:00
velter
9dd1dd0111 Compiler bug in const arrays
There a compiler bug in array constants. A construct like

procedure B(eType : TObject);
begin
	if eType is TObject then ;
end;

function A(eVal : int32) : booleen;
begin
	result:=not(eVal in [1,2]);
end;         

begin
	A(1);
	A(2);
	A(3);
end;


Cause an AV in UpsCompiler line 6185. The root cause is the use of FindAndAddType with no name. The function return the last created anonymous type. In the previous sample it's a Type created by the "is" operator which is not an array. Casting it to TPSArrayType lead to the AV.
2014-05-27 14:51:17 +02:00
pchev
8ce29b39c5 Comobj support for FPC 2014-05-19 10:11:51 +02:00
velter
98145c07a1 Allow forward declaration 2014-05-07 11:36:31 +02:00
velter
980d731d32 Proposal to prevent duplicate register
Add a new property to control the behavior. By default, the behavior is not changed. Setting AllowDuplicateRegsiter to false will raise an exception each time a class/interface/function register a name already known.
2014-05-07 09:59:55 +02:00
Lewin
c68d42b839 Merge branch 'master' of https://github.com/remobjects/pascalscript 2014-05-04 18:06:17 +10:00
Lewin
2c9dc5455c Defining a "set of byte" no longer requires casting each element to byte 2014-04-26 20:06:44 +10:00
velter
561066d5cd Remove warnings
Implicit conversion from Ansi to Unicode
2014-04-08 17:35:29 +02:00
Carlo Kok
96b415f190 Merge pull request #66 from geby/master
Removed undesirable typecast to WideString
2014-03-11 08:04:15 +01:00
Carlo Kok
1b6d5ac13b Merge pull request #70 from velter/patch-3
Remove warnings
2014-03-11 08:03:34 +01:00
Carlo Kok
94c5198fd1 0: Cast to IPointer instead of Cardinal for 64bits Pascal SCript 2013-12-03 12:42:38 +01:00
velter
36f007a7f2 Remove a warning 2013-11-18 17:34:49 +01:00
velter
3c81406c02 Patch for issue #67 2013-11-18 16:52:26 +01:00
geby
3cbd7e5628 - GetUnicodeString was same as GetWideString before. Improved to faster default conversions.
- Corrected result of 'plus' string operation to UnicodeString.
2013-11-07 14:30:46 +01:00
Carlo Kok
3c93994501 Merge pull request #37 from Shoozza/kylix-compatibility-fix
Fix Kylix compilation errors
2013-11-07 03:47:43 -08:00
vdemidov
ff9f866b9f Add support of interface-variable to Assigned function
Assign function was compatible with classe, PChar and string but not compatible with interface.
2013-08-21 10:02:34 +03:00
evgeny-k
29944c0f5f Merge pull request #42 from JohnPeel/GetArrayLength-fix
GetArrayLength, First parameter doesn't need to be a variable.
2013-08-14 04:43:06 -07:00
John Peel
976b80b833 GetArrayLength, First parameter doesn't need to be a variable. 2013-06-08 00:02:15 -04:00
lewinjh
f8e612ceea - It is now possible to iterate over enumerations
- Added set functions Include and Exclude
2013-06-05 18:31:39 +10:00
Gregor A. Cieslak
85e8d5032b Fix Kylix compilation errors 2013-05-28 07:17:59 +02:00
Martijn Laan
ccad499426 Add StrToInt64Def.
Add comment pointing to the places where the standard funtions are defined.
2013-01-15 21:28:21 +01:00
Martijn Laan
3e720bee8a Fix compiler errors introduced by commit 54a4cf632a. 2013-01-12 16:20:47 +01:00
Carlo Kok
54a4cf632a Patch by Martin Friebe to make sure 64bits pointers are never truncated 2012-12-10 09:34:45 +01:00
vyacheslavd
ee3749e7b7 46955: PascalScript: Warning shows wrong row,col number in some constructions
git-svn-id: http://code.remobjects.com/svn/pascalscript@261 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2012-02-17 09:30:56 +00:00
ck
d7571d7ef9 make exportname = true the default.
git-svn-id: http://code.remobjects.com/svn/pascalscript@248 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2011-03-02 07:10:05 +00:00
ck
875121c9c7 Issue 132: "Unknown indentifier" inside unit (fixed by Lukas Gebauer)
git-svn-id: http://code.remobjects.com/svn/pascalscript@243 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2010-12-14 08:17:04 +00:00
andreyt
d68fee08b3 0:fixed bug with Unit_Name property.
git-svn-id: http://code.remobjects.com/svn/pascalscript@237 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2010-09-28 11:52:45 +00:00
ck
911bc3b7aa 0: Dropped all warnings in 2007+
git-svn-id: http://code.remobjects.com/svn/pascalscript@236 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2010-09-27 14:03:39 +00:00
ck
0a9ac85673 Patch from Frédéric Hannes for PS_NOWIDESTRING support.
git-svn-id: http://code.remobjects.com/svn/pascalscript@234 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2010-08-26 06:41:03 +00:00
ck
33b59e8b6c Changes from Frederic Hannes to improve unicode support.
git-svn-id: http://code.remobjects.com/svn/pascalscript@232 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2010-08-09 07:35:28 +00:00
ck
9675b8b9de Tweaks for d5 support from Eric Jansen eric.thuisremovethis@planet.nl
git-svn-id: http://code.remobjects.com/svn/pascalscript@230 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2010-07-08 09:28:01 +00:00
mlaan
df25ea9efe Fixed compile time type freeing bug.
git-svn-id: http://code.remobjects.com/svn/pascalscript@219 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2010-03-29 09:02:34 +00:00
ck
358ec2d054 Issue 111: Trim function doesn't work like in Delphi
Issue 112: PS_NOWIDESTRING flag

git-svn-id: http://code.remobjects.com/svn/pascalscript@218 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
2010-03-29 07:29:09 +00:00