Skip to content

Commit

Permalink
bf function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
vdelachaux committed Oct 5, 2021
1 parent 6b24e03 commit 69e379a
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 26 deletions.
Binary file modified Build/Components/4DPop Macros.4dbase/4DPop Macros.4DZ
Binary file not shown.
2 changes: 1 addition & 1 deletion Build/Components/4DPop Macros.4dbase/Info.plist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>CFBundleName</key> <string>4DPop Macros</string> <key>CFBundleVersion</key> <string>221</string> <key>NSHumanReadableCopyright</key> <string>©4D SAS 2009-2021</string> <key>CFBundleGetInfoString</key> <string>4DPop Macros</string> <key>CFBundleLongVersionString</key> <string>19R4</string> <key>CFBundleShortVersionString</key> <string>19R4</string> <key>CFBundleDisplayName</key> <string>4DPop Macros</string> </dict></plist>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>CFBundleName</key> <string>4DPop Macros</string> <key>CFBundleVersion</key> <string>223</string> <key>NSHumanReadableCopyright</key> <string>©vdl 2009-2021</string> <key>CFBundleGetInfoString</key> <string>4DPop Macros</string> <key>CFBundleLongVersionString</key> <string>19R4</string> <key>CFBundleShortVersionString</key> <string>19R4</string> <key>CFBundleDisplayName</key> <string>4DPop Macros</string> </dict></plist>
Expand Down
Binary file modified Build/Components/4DPop Macros.4dbase/Libraries/lib4d-arm64.dylib
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>CFBundleName</key> <string>4DPop Macros</string> <key>CFBundleVersion</key> <string>221</string> <key>NSHumanReadableCopyright</key> <string>©4D SAS 2009-2021</string> <key>CFBundleGetInfoString</key> <string>4DPop Macros</string> <key>CFBundleLongVersionString</key> <string>19R4</string> <key>CFBundleShortVersionString</key> <string>19R4</string> <key>CFBundleDisplayName</key> <string>4DPop Macros</string> </dict></plist>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>CFBundleName</key> <string>4DPop Macros</string> <key>CFBundleVersion</key> <string>223</string> <key>NSHumanReadableCopyright</key> <string>©vdl 2009-2021</string> <key>CFBundleGetInfoString</key> <string>4DPop Macros</string> <key>CFBundleLongVersionString</key> <string>19R4</string> <key>CFBundleShortVersionString</key> <string>19R4</string> <key>CFBundleDisplayName</key> <string>4DPop Macros</string> </dict></plist>
Expand Down
Binary file modified Libraries/lib4d-arm64.dylib
Binary file not shown.
25 changes: 14 additions & 11 deletions Project/Sources/Classes/declaration.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ Function parseParameters($line : Object)
"count"; 0; \
"order"; $index)

$parameter.inDeclaration:=($parameter.type#0)
$parameter.label:="← "+$parameter.value

If ($c.length=2)
Expand Down Expand Up @@ -736,6 +737,8 @@ Function parseParameters($line : Object)
"count"; 0; \
"order"; 0)

$parameter.inDeclaration:=($parameter.type#0)

If ($c.length=2)

If (Match regex:C1019("(?m-si)^\\s*((?:4D|cs)\\.[^$/]*)(/[^$]*)?$"; $c[1]; 1))
Expand Down Expand Up @@ -783,67 +786,67 @@ Function getTypeFromDeclaration($text : Text)->$type : Integer
//______________________________________________________
: (Position:C15(Parse formula:C1576(":C285"); $text)=1)\
| (Position:C15(Parse formula:C1576(":C219"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Real"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Real$"; $text; 1)

$type:=Is real:K8:4

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C286"); $text)=1)\
| (Position:C15(Parse formula:C1576(":C279"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Picture"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Picture$"; $text; 1)

$type:=Is picture:K8:10

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C301"); $text)=1)\
| (Position:C15(Parse formula:C1576(":C280"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Pointer"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Pointer$"; $text; 1)

$type:=Is pointer:K8:14

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C305"); $text)=1)\
| (Position:C15(Parse formula:C1576(":C223"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Boolean"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Boolean$"; $text; 1)

$type:=Is boolean:K8:9

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C306"); $text)=1)\
| (Position:C15(Parse formula:C1576(":C1223"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Time"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Time$"; $text; 1)

$type:=Is time:K8:8

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C307"); $text)=1)\
| (Position:C15(Parse formula:C1576(":C224"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Date"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Date$"; $text; 1)

$type:=Is date:K8:7

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C604"); $text)=1)\
| (Position:C15(Parse formula:C1576(":C1222"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Blob"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Blob$"; $text; 1)

$type:=Is BLOB:K8:12

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C1216"); $text)=1)\
| (Position:C15(Parse formula:C1576(":C1221"); $text)=1)

| (Position:C15(Parse formula:C1576(":C1221"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Object$"; $text; 1)
$type:=Is object:K8:27

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C1488"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Collection"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Collection$"; $text; 1)

$type:=Is collection:K8:32

//______________________________________________________
: (Position:C15(Parse formula:C1576(":C1683"); $text)=1)\
| Match regex:C1019("(?mi-s)\\s*:\\s*Variant"; $text; 1)
| Match regex:C1019("(?mi-s)\\s*:\\s*Variant$"; $text; 1)

$type:=Is variant:K8:33

Expand Down
40 changes: 39 additions & 1 deletion Project/Sources/Classes/test_.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,42 @@ WARNING: "localhost" may not find the server if the computer is connected to a n
End case
End if


Function addField($field : Object; $fields : Collection)

var $ok : Boolean
var $index : Integer

$ok:=True:C214

If ($field.fieldType=8859)

// 1-N relation with published related data class
$ok:=(Form:C1466.dataModel[String:C10($field.relatedTableNumber)]#Null:C1517)

End if

If ($ok)

If ($field.fieldType#8859) // Not 1-N relation

$index:=$fields.indexOf(Null:C1517)

If (($index#-1))

// Set
$fields[$index]:=$field

Else

// Append
$fields.push($field)

End if

Else

// Append
$fields.push($field)

End if
End if
Binary file modified Resources/InfoPlist.strings
Binary file not shown.
24 changes: 12 additions & 12 deletions make.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"postBuild": {
"buildNumber": true,
"owner": "VDL",
"InfoPlist": true,
"remove": [
"Build/",
"Data/",
"Resources/php.ini",
"_config.yml"
]
}
}
"postBuild": {
"InfoPlist": true,
"buildNumber": true,
"owner": "vdl",
"remove": [
"Build/",
"Data/",
"Resources/php.ini",
"_config.yml"
]
}
}

0 comments on commit 69e379a

Please sign in to comment.