diff --git a/Build/4DPop Macros.zip b/Build/4DPop Macros.zip
new file mode 100644
index 0000000..0e66b33
Binary files /dev/null and b/Build/4DPop Macros.zip differ
diff --git a/Build/Components/4DPop Macros.4dbase/4DPop Macros.4DZ b/Build/Components/4DPop Macros.4dbase/4DPop Macros.4DZ
index 1a6ad34..96eabff 100755
Binary files a/Build/Components/4DPop Macros.4dbase/4DPop Macros.4DZ and b/Build/Components/4DPop Macros.4dbase/4DPop Macros.4DZ differ
diff --git a/Build/Components/4DPop Macros.4dbase/Info.plist b/Build/Components/4DPop Macros.4dbase/Info.plist
index cc22cec..5873bf6 100755
--- a/Build/Components/4DPop Macros.4dbase/Info.plist
+++ b/Build/Components/4DPop Macros.4dbase/Info.plist
@@ -6,15 +6,15 @@
CFBundleName
4DPop Macros
CFBundleVersion
- 258
+ 260
NSHumanReadableCopyright
©vdl 2009-2023
CFBundleGetInfoString
- 20R3
+ 20R2
CFBundleLongVersionString
- 20R3 (257)
+ 20R2 (259)
CFBundleShortVersionString
- 20R3
+ 20R2
CFBundleDisplayName
4DPop Macros
diff --git a/Build/Components/4DPop Macros.4dbase/Libraries/lib4d-arm64.dylib b/Build/Components/4DPop Macros.4dbase/Libraries/lib4d-arm64.dylib
index 0896564..5fdd2f7 100644
Binary files a/Build/Components/4DPop Macros.4dbase/Libraries/lib4d-arm64.dylib and b/Build/Components/4DPop Macros.4dbase/Libraries/lib4d-arm64.dylib differ
diff --git a/Build/Components/4DPop Macros.4dbase/Resources/InfoPlist.strings b/Build/Components/4DPop Macros.4dbase/Resources/InfoPlist.strings
index 5f8ac65..3041512 100755
Binary files a/Build/Components/4DPop Macros.4dbase/Resources/InfoPlist.strings and b/Build/Components/4DPop Macros.4dbase/Resources/InfoPlist.strings differ
diff --git a/Build/Components/4DPop Macros.dmg b/Build/Components/4DPop Macros.dmg
deleted file mode 100644
index d36dc19..0000000
Binary files a/Build/Components/4DPop Macros.dmg and /dev/null differ
diff --git a/Info.plist b/Info.plist
index cc22cec..5873bf6 100755
--- a/Info.plist
+++ b/Info.plist
@@ -6,15 +6,15 @@
CFBundleName
4DPop Macros
CFBundleVersion
- 258
+ 260
NSHumanReadableCopyright
©vdl 2009-2023
CFBundleGetInfoString
- 20R3
+ 20R2
CFBundleLongVersionString
- 20R3 (257)
+ 20R2 (259)
CFBundleShortVersionString
- 20R3
+ 20R2
CFBundleDisplayName
4DPop Macros
diff --git a/Project/Sources/Classes/declaration.4dm b/Project/Sources/Classes/declaration.4dm
index a8e1d3c..da03af9 100755
--- a/Project/Sources/Classes/declaration.4dm
+++ b/Project/Sources/Classes/declaration.4dm
@@ -1317,13 +1317,28 @@ Function addNewLine($text : Text)->$result : Text
End if
//==============================================================
-Function clairvoyant($text : Text; $line : Text)->$varType : Integer
+Function clairvoyant($text : Text; $line : Text) : Integer
var $pattern; $t; $type : Text
- var $indx : Integer
+ var $indx; $varType : Integer
- ARRAY LONGINT:C221($pos; 0)
ARRAY LONGINT:C221($len; 0)
+ ARRAY LONGINT:C221($pos; 0)
+
+ Case of
+
+ //______________________________________________________
+ : (Match regex:C1019("(?mi-s).*:=\\{"; $line; 1; *)) // Object literal
+
+ return (Is object:K8:27)
+
+ //______________________________________________________
+ : (Match regex:C1019("(?mi-s).*:=\\["; $line; 1; *)) // Collection literal
+
+ return (Is collection:K8:32)
+
+ //______________________________________________________
+ End case
$t:=Replace string:C233(Replace string:C233($text; "{"; "\\{"); "}"; "\\}")
@@ -1332,19 +1347,19 @@ Function clairvoyant($text : Text; $line : Text)->$varType : Integer
//______________________________________________________
: (Match regex:C1019("(?m-si)(\\$\\w*):=((?:cs|4d)\\.\\w*)\\.new\\([^)]*\\)(?!\\.)"; $line; 1; $pos; $len)) // Class
- $varType:=Is object:K8:27
-
// Keep class definition
This:C1470.classes.push(New object:C1471(\
"value"; Substring:C12($line; \
$pos{1}; $len{1}); \
"class"; Substring:C12($line; $pos{2}; $len{2})))
+ return (Is object:K8:27)
+
//______________________________________________________
: (Match regex:C1019("(?m-si)\\"+$t+":=\"[^\"]*\""\
+"|"+Command name:C538(16)+"\\(\\"+$t+"\\)"; $line; 1)) // Length
- $varType:=Is text:K8:3
+ return (Is text:K8:3)
//______________________________________________________
: (Match regex:C1019("(?mi-s)\\"+$t+"[:><]?[=><]?\\d+[."+This:C1470.decimalSeparator+"]\\d+"; $line; 1))\
@@ -1353,7 +1368,7 @@ Function clairvoyant($text : Text; $line : Text)->$varType : Integer
| (Match regex:C1019(":=\\s*"+Parse formula:C1576(":K30:3"); $line; 1))\
| (Match regex:C1019(":=\\s*"+Parse formula:C1576(":K30:4"); $line; 1))
- $varType:=Is real:K8:4
+ return (Is real:K8:4)
//______________________________________________________
: (Match regex:C1019("(?m-si)\\"+$t+"[:><]?[=><]?\\d+"; $line; 1))\
@@ -1362,44 +1377,44 @@ Function clairvoyant($text : Text; $line : Text)->$varType : Integer
| (Match regex:C1019(":=\\s*"+Parse formula:C1576(":K35:2"); $line; 1))\
| (Match regex:C1019(":=\\s*"+Parse formula:C1576(":K35:3"); $line; 1))
- $varType:=Is longint:K8:6
+ return (Is longint:K8:6)
//______________________________________________________
: (Match regex:C1019("(?m-si)\\"+$t+":=(?:"+Command name:C538(214)+"|"+Command name:C538(215)+")(?=$|\\(|(?:\\s*//)|(?:\\s*/\\*))"; $line; 1))
- $varType:=Is boolean:K8:9
+ return (Is boolean:K8:9)
//______________________________________________________
: (Match regex:C1019("(?m-si)\\"+$t+"\\."; $line; 1))\
| (Match regex:C1019("(?m-si):="+Parse formula:C1576("Form:C1466")+"[^.]"; $line; 1))
- $varType:=Is object:K8:27
+ return (Is object:K8:27)
//______________________________________________________
: (Match regex:C1019("(?m-si)\\"+$t+":=(?:!\\d+-\\d+-\\d+!)"; $line; 1))
- $varType:=Is date:K8:7
+ return (Is date:K8:7)
//______________________________________________________
: (Match regex:C1019("(?m-si)\\"+$t+":=(?:\\?\\d+:\\d+:\\d+\\?)"; $line; 1))
- $varType:=Is time:K8:8
+ return (Is time:K8:8)
//______________________________________________________
: (Match regex:C1019("(?mi-s)\\"+$t+":=->"; $line; 1))\
| (Match regex:C1019("(?mi-s)\\"+$t+"->"; $line; 1))
- $varType:=Is pointer:K8:14
+ return (Is pointer:K8:14)
//______________________________________________________
: (Match regex:C1019("(?m-si)(?:For|Boucle)\\s\\((?:[^;]*;\\s*){0,3}(\\"+$t+")"; $line; 1))
- $varType:=Is longint:K8:6
+ return (Is longint:K8:6)
//______________________________________________________
: (Match regex:C1019("(?m-si)(?:If|Si|Not|Non)\\s*\\(\\"+$t+"\\)"; $line; 1))
- $varType:=Is boolean:K8:9
+ return (Is boolean:K8:9)
//______________________________________________________
@@ -1411,22 +1426,22 @@ Function clairvoyant($text : Text; $line : Text)->$varType : Integer
If ($indx>0)
- For each ($pattern; This:C1470.gramSyntax[$type]) While ($varType=0)
+ For each ($pattern; This:C1470.gramSyntax[$type])
If (Match regex:C1019(Replace string:C233($pattern; "%"; $t); $line; 1))
- $varType:=Num:C11(Substring:C12($type; 1; $indx-1))
+ return Num:C11(Substring:C12($type; 1; $indx-1))
End if
End for each
Else
- For each ($pattern; This:C1470.gramSyntax[$type]) While ($varType=0)
+ For each ($pattern; This:C1470.gramSyntax[$type])
If (Match regex:C1019(Replace string:C233($pattern; "%"; $t)+"(?=$|\\(|(?:\\s*//)|(?:\\s*/\\*))"+")"; $line; 1))
- $varType:=Num:C11($type)
+ return Num:C11($type)
End if
End for each
diff --git a/Resources/InfoPlist.strings b/Resources/InfoPlist.strings
index 5f8ac65..3041512 100755
Binary files a/Resources/InfoPlist.strings and b/Resources/InfoPlist.strings differ
diff --git a/lastbuild b/lastbuild
index c90adaf..a01c797 100644
--- a/lastbuild
+++ b/lastbuild
@@ -1 +1 @@
-20R3
\ No newline at end of file
+20R2
\ No newline at end of file