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 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 (CURRENT_DIR , "../../include/clang/ASTMatchers/ASTMatchers.h" )
24
+ HTML_FILE = os .path .join (CURRENT_DIR , "../LibASTMatchersReference.html" )
22
25
23
26
# Each matcher is documented in one row of the form:
24
27
# result | name | argA
@@ -590,7 +593,7 @@ def sort_table(matcher_type, matcher_map):
590
593
narrowing_matcher_table = sort_table ("NARROWING" , narrowing_matchers )
591
594
traversal_matcher_table = sort_table ("TRAVERSAL" , traversal_matchers )
592
595
593
- reference = open ("../LibASTMatchersReference.html" ).read ()
596
+ reference = open (HTML_FILE ).read ()
594
597
reference = re .sub (
595
598
r"<!-- START_DECL_MATCHERS.*END_DECL_MATCHERS -->" ,
596
599
node_matcher_table ,
You can’t perform that action at this time.
0 commit comments