Skip to content

Commit d9518f6

Browse files
committed
Define DOCURIUM when parsing
Define DOCURIUM to 1 when parsing the headers to let the source code know it's being run for documentation parsing and give it a chance to perform any workarounds they might need.
1 parent e4b1e65 commit d9518f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/docurium/docparser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def parse_file(orig_filename, files)
2626

2727
# Override the path we want to filter by
2828
filename = File.join(tmpdir, orig_filename)
29-
tu = Index.new.parse_translation_unit(filename, [], unsaved, {:detailed_preprocessing_record => 1})
29+
tu = Index.new.parse_translation_unit(filename, ["-DDOCURIUM=1"], unsaved, {:detailed_preprocessing_record => 1})
3030

3131
FileUtils.remove_entry(tmpdir)
3232

0 commit comments

Comments
 (0)