You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
prequeue: dont initialize a new preprocessor for each file
This commit is contained in:
@ -51,17 +51,16 @@ def load_pokecrystal_macros():
|
||||
|
||||
return ourmacros
|
||||
|
||||
def preprocess(config, macros, lines=None):
|
||||
"""
|
||||
Entry point for the preprocessor.
|
||||
"""
|
||||
processor = preprocessor.Preprocessor(config, macros)
|
||||
return processor.preprocess(lines=lines)
|
||||
|
||||
def main():
|
||||
def setup_processor():
|
||||
config = configuration.Config()
|
||||
macros = load_pokecrystal_macros()
|
||||
return preprocess(config, macros)
|
||||
processor = preprocessor.Preprocessor(config, macros)
|
||||
return processor
|
||||
|
||||
def main():
|
||||
processor = setup_processor()
|
||||
processor.preprocess()
|
||||
processor.update_globals
|
||||
|
||||
# only run against stdin when not included as a module
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user