File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-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 (
24+ CURRENT_DIR , "../../include/clang/ASTMatchers/ASTMatchers.h"
25+ )
26+ HTML_FILE = os .path .join (CURRENT_DIR , "../LibASTMatchersReference.html" )
2227
2328# Each matcher is documented in one row of the form:
2429# result | name | argA
@@ -590,7 +595,7 @@ def sort_table(matcher_type, matcher_map):
590595narrowing_matcher_table = sort_table ("NARROWING" , narrowing_matchers )
591596traversal_matcher_table = sort_table ("TRAVERSAL" , traversal_matchers )
592597
593- reference = open ("../LibASTMatchersReference.html" ).read ()
598+ reference = open (HTML_FILE ).read ()
594599reference = re .sub (
595600 r"<!-- START_DECL_MATCHERS.*END_DECL_MATCHERS -->" ,
596601 node_matcher_table ,
You can’t perform that action at this time.
0 commit comments