Update Code Generator for Extensions - Add Command : <runcodenow>
in method prototype - when we use @ in the method name
we mean that we have the same method with different parameters (As in C++)
Using <loadfile> filename.cf we can separate the configuration to many files
+ Using <runcodenow> we can execute code directly to defined variables for <filter>
+ Using $globals we have global list for variables used by <runcodenow>
*/
load "stdlibcore.ring"
@@ -135,6 +137,10 @@ if isWindows()
nl = Windowsnl()
ok
+# Global list to be used by command <runcodenow> when needed
+
+$globals = []
+
Func Main
if len(sysargv) < 3
See "Input : filename.cf is missing!" + nl
@@ -226,7 +232,7 @@ Func ProcessCommands aData,aList
$lIgnoreCPointerTypeCheck = true
loop
but left(cLine,8) = "<filter>"
- cFilter = "lInclude = " + trim(substr(cLine,9))
+ cFilter = "lInclude = (" + trim(substr(cLine,9)) + ")"
see "Execute Filter : " + cFilter + nl
eval(cFilter)
See "Filter output : " + lInclude + nl
@@ -261,6 +267,10 @@ Func ProcessCommands aData,aList
ProcessCommands(aData,aSubList)
chdir(cDir)
loop
+ but left(lower(cLine),12)="<runcodenow>"
+ cCodeNow = trim(substr(cLine,13))
+ eval(cCodeNow)
+ loop
ok
if lFlag = C_INS_FUNCTION
aData + ThreeParts(cLine)
