18 lines
406 B
Python
18 lines
406 B
Python
# similar to parse.pokemon.names
|
|
|
|
from functools import partial
|
|
|
|
from parse.generic import tokenize
|
|
from parse.generic import string
|
|
|
|
lines = partial(tokenize.lines, prefix="li ")
|
|
|
|
def flatten(tokens):
|
|
for _, (s,) in tokens:
|
|
yield string.parse(s)
|
|
|
|
def parse(prefix):
|
|
path = prefix / "data/moves/names.asm"
|
|
with open(path) as f:
|
|
return list(flatten(lines(f.read().split('\n'))))
|