Research portable Memory game | Исследовать портируемую игру Память
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

30 lignes
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()