mirror of
https://github.com/Brandon-Rozek/matmod.git
synced 2025-07-29 20:52:01 +00:00
(#36) Optimize MaGIC Input Parsing
This commit is contained in:
commit
b1452ac672
1 changed files with 1 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue