(#36) Optimize MaGIC Input Parsing

This commit is contained in:
Brandon Rozek 2025-03-18 15:50:56 -04:00 committed by GitHub
commit b1452ac672
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,10 +45,7 @@ class SourceFile:
self.reststr = next(self.fileobj).strip()
self.current_line += 1
tokens = self.reststr.split(" ")
next_token = tokens[0]
self.reststr = " ".join(tokens[1:])
next_token, _, self.reststr = self.reststr.partition(" ")
return next_token
class UglyHeader: