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 5
5
6
6
import collections
7
7
import re
8
+ import os
8
9
9
10
try :
10
11
from urllib .request import urlopen
18
19
CLASS_INDEX_PAGE = None
19
20
print ("Unable to get %s: %s" % (CLASS_INDEX_PAGE_URL , e ))
20
21
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" )
22
27
23
28
# Each matcher is documented in one row of the form:
24
29
# result | name | argA
@@ -590,7 +595,7 @@ def sort_table(matcher_type, matcher_map):
590
595
narrowing_matcher_table = sort_table ("NARROWING" , narrowing_matchers )
591
596
traversal_matcher_table = sort_table ("TRAVERSAL" , traversal_matchers )
592
597
593
- reference = open ("../LibASTMatchersReference.html" ).read ()
598
+ reference = open (HTML_FILE ).read ()
594
599
reference = re .sub (
595
600
r"<!-- START_DECL_MATCHERS.*END_DECL_MATCHERS -->" ,
596
601
node_matcher_table ,
You can’t perform that action at this time.
0 commit comments