File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 1
1
2015-02-24 JJ Allaire <
[email protected] >
2
2
3
3
* src/attributes.cpp: Guard against includes referencing themselves
4
- (and thus creating an endless loop of include processing).
4
+ (and thus creating an endless loop of include processing); Process
5
+ attributes in included files.
5
6
6
7
2015-02-20 Lionel Henry <
[email protected] >
7
8
Original file line number Diff line number Diff line change @@ -1084,9 +1084,30 @@ namespace attributes {
1084
1084
// Parse embedded R
1085
1085
embeddedR_ = parseEmbeddedR (lines_, lines);
1086
1086
1087
- // Recursively parse local includes
1088
- if (localIncludes)
1087
+ // Recursively parse local includes if requested
1088
+ if (localIncludes) {
1089
+
1090
+ // get local includes
1089
1091
localIncludes_ = parseLocalIncludes (sourceFile);
1092
+
1093
+ // parse attributes and modules from each local include
1094
+ for (size_t i = 0 ; i<localIncludes_.size (); i++) {
1095
+
1096
+ // perform parse
1097
+ std::string include = localIncludes_[i].path ();
1098
+ SourceFileAttributesParser parser (include, false );
1099
+
1100
+ // copy to base attributes
1101
+ std::copy (parser.begin (),
1102
+ parser.end (),
1103
+ std::back_inserter (attributes_));
1104
+
1105
+ // copy to base modules
1106
+ std::copy (parser.modules ().begin (),
1107
+ parser.modules ().end (),
1108
+ std::back_inserter (modules_));
1109
+ }
1110
+ }
1090
1111
}
1091
1112
}
1092
1113
You can’t perform that action at this time.
0 commit comments