feaLib.parser: use set for predefined ssXX and cvXX tags

it turns out regex would be slower in this case

See comments:
7cefeadb3a (r28011318)
This commit is contained in:
Cosimo Lupo 2018-03-15 13:07:53 +00:00
parent 1f99bb6d86
commit 88f495dd68
No known key found for this signature in database
GPG Key ID: 59D54DB0C9976482

View File

@ -16,8 +16,8 @@ log = logging.getLogger(__name__)
class Parser(object): class Parser(object):
extensions = {} extensions = {}
ast = ast ast = ast
SS_FEATURE_TAGS = ["ss%02d" % i for i in range(1, 20+1)] SS_FEATURE_TAGS = {"ss%02d" % i for i in range(1, 20+1)}
CV_FEATURE_TAGS = ["cv%02d" % i for i in range(1, 99+1)] CV_FEATURE_TAGS = {"cv%02d" % i for i in range(1, 99+1)}
def __init__(self, featurefile, glyphNames=(), followIncludes=True, def __init__(self, featurefile, glyphNames=(), followIncludes=True,
**kwargs): **kwargs):