diff --git a/bin/.autofile b/bin/.autofile index 2658ede..188c3a0 100644 --- a/bin/.autofile +++ b/bin/.autofile @@ -1,5 +1,8 @@ ::ASYNC +.init{ + + echo "Hello Initial" +} dev { + echo Hello World > test.txt && cat test.txt } diff --git a/bin/auto.exe b/bin/auto.exe index affdf90..bea755a 100644 Binary files a/bin/auto.exe and b/bin/auto.exe differ diff --git a/src/lib.cpp b/src/lib.cpp index e9ce8ec..8c886d3 100644 --- a/src/lib.cpp +++ b/src/lib.cpp @@ -129,8 +129,8 @@ void __processBlocks(std::string fileName, std::string targetBlock) currentBlock = line.substr(0, line.length() - 2); // Extract block name (before '{') std::cout << "Found block: " << currentBlock << std::endl; - // Check if this is the target block - if (currentBlock == targetBlock) + // Check if this is the target block or if the block starts with "." + if (currentBlock == targetBlock || currentBlock.front() == '.') { blockFound = true; // Set the flag if the block matches the target } @@ -140,9 +140,9 @@ void __processBlocks(std::string fileName, std::string targetBlock) // End of current block currentBlock = ""; } - else if (!currentBlock.empty() && currentBlock == targetBlock) + else if (!currentBlock.empty() && (currentBlock == targetBlock || currentBlock.front() == '.')) { - // If we are in the target block, process commands + // If we are in the target block or a special block starting with a dot (".") if (line[0] == '+') { // Process commands within a block @@ -220,4 +220,4 @@ void __processBlocks(std::string fileName, std::string targetBlock) void autoRunner(std::string sourceFile, std::string targetBlock) { __processBlocks(sourceFile, targetBlock); -} \ No newline at end of file +}