MCPcopy Create free account
hub / github.com/etingof/apacheconfig / make_parser

Function make_parser

apacheconfig/parser.py:231–253  ·  view source on GitHub ↗
(**options)

Source from the content-addressed store, hash-verified

229
230
231def make_parser(**options):
232
233 parser_class = BaseApacheConfigParser
234
235 if options.get('ccomments', True):
236 parser_class = type(str('ApacheConfigParser'),
237 (parser_class, CStyleCommentsParser),
238 {'options': options})
239 else:
240 parser_class = type(str('ApacheConfigParser'),
241 (parser_class, HashCommentsParser),
242 {'options': options})
243
244 if options.get('useapacheinclude', True):
245 parser_class = type(str('ApacheConfigParser'),
246 (parser_class, ApacheIncludesParser),
247 {'options': options})
248 else:
249 parser_class = type(str('ApacheConfigParser'),
250 (parser_class, IncludesParser),
251 {'options': options})
252
253 return parser_class

Callers 15

_create_parserFunction · 0.90
_make_parserMethod · 0.90
testUnicodeSupportMethod · 0.90
testOptionAndValueMethod · 0.90
testHashCommentsMethod · 0.90
testCStyleCommentsMethod · 0.90
testIncludesMethod · 0.90
testOptionAndValueSetMethod · 0.90
testBlockWithOptionsMethod · 0.90

Calls

no outgoing calls

Tested by 15

_create_parserFunction · 0.72
_make_parserMethod · 0.72
testUnicodeSupportMethod · 0.72
testOptionAndValueMethod · 0.72
testHashCommentsMethod · 0.72
testCStyleCommentsMethod · 0.72
testIncludesMethod · 0.72
testOptionAndValueSetMethod · 0.72
testBlockWithOptionsMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…