File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 55
66import collections
77import re
8+ import os
89
910try :
1011 from urllib .request import urlopen
1819 CLASS_INDEX_PAGE = None
1920 print ("Unable to get %s: %s" % (CLASS_INDEX_PAGE_URL , e ))
2021
21- MATCHERS_FILE = "../../include/clang/ASTMatchers/ASTMatchers.h"
22+ CURRENT_DIR = os .path .dirname (__file__ )
23+ MATCHERS_FILE = os .path .join (CURRENT_DIR , "../../include/clang/ASTMatchers/ASTMatchers.h" )
24+ HTML_FILE = os .path .join (CURRENT_DIR , "../LibASTMatchersReference.html" )
2225
2326# Each matcher is documented in one row of the form:
2427# result | name | argA
@@ -590,7 +593,7 @@ def sort_table(matcher_type, matcher_map):
590593narrowing_matcher_table = sort_table ("NARROWING" , narrowing_matchers )
591594traversal_matcher_table = sort_table ("TRAVERSAL" , traversal_matchers )
592595
593- reference = open ("../LibASTMatchersReference.html" ).read ()
596+ reference = open (HTML_FILE ).read ()
594597reference = re .sub (
595598 r"<!-- START_DECL_MATCHERS.*END_DECL_MATCHERS -->" ,
596599 node_matcher_table ,
You can’t perform that action at this time.
0 commit comments