Closed luisesanmartin closed 1 year ago
There is no deep parsing of line contents here -- it simply recognizes that do
is part of the line as it copies it over and flags that as a subfile. These will never return errors though since they will not be executed. I don't have the regex
skills to parse out that //
is the first non-blank characters, but that would be a potential solution here. Can you try it with /* */
instead and see what it does as well?
Do-file:
foreach letter in a b c {
display "`letter'"
}
/*
do "${do_tables}/table_1.do"
do "${do_tables}/table_2.do"
do "${do_tables}/table_3.do"
do "${do_tables}/table_4.do"
do "${do_tables}/table_5.do"
do "${do_tables}/table_6.do"
do "${do_tables}/table_7.do"
do "${do_tables}/table_b1.do"
*/
Output:
. iedorep dofile.do
Processing: dofile.do
Entering dofile.do run....
Done with dofile.do!
.
It seems to work correctly
But when /* ... */
are in the same line, it shows the same output as before:
foreach letter in a b c {
display "`letter'"
}
/* do "${do_tables}/table_1.do" */
output:
. iedorep dofile.do
Processing: dofile.do
Entering dofile.do run....
Done with dofile.do!
+----------------------------------------------------+
| Line | Depth | Loop | Data | Seed | Sort | Subfile |
|------+-------+------+------+------+------+---------|
| 6 | 0 | 1 | | | | Yes |
+----------------------------------------------------+
.
This do-file (
dofile.do
):has the following output for
iedorep dofile.do
:I think this is possibly a bug given that these lines are commented out. Note that I tried this in the current development version, not in the stable one.