Research portable Memory game | Исследовать портируемую игру Память
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

30 řádky
537B

  1. from CPP import *
  2. from Function import *
  3. def process(FILE_IN):
  4. # Read file.
  5. lines_in = []
  6. with open(FILE_IN) as file:
  7. for line in file:
  8. lines_in.append(line.rstrip())
  9. f = Function()
  10. # Parse.
  11. for ln in lines_in:
  12. ln = ln.rstrip()
  13. # Ignore includes.
  14. if "#include" in ln:
  15. continue
  16. f.parseLine(ln)
  17. if f.isComplete:
  18. print("Function ready!")
  19. break
  20. print(f"Debug: {f}")
  21. cpp = CPP(f)
  22. return cpp.translate()