From b36356db45fc59f8363c83b2ddac288aef1024ae Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sat, 26 Jul 2014 03:59:35 +0200 Subject: [PATCH] Change default options set to frozenset, and add a TODO. Not convinced a set is the way to go here, though, given it's checked at the beginning only. --- lslopt/lslparse.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lslopt/lslparse.py b/lslopt/lslparse.py index 18f7bd8..761cc58 100644 --- a/lslopt/lslparse.py +++ b/lslopt/lslparse.py @@ -1642,7 +1642,7 @@ class parser(object): self.NextToken() - def parse(self, script, options = set()): + def parse(self, script, options = frozenset()): """Parse the given stream with the given options. This function also builds the temporary globals table. @@ -1663,12 +1663,15 @@ class parser(object): # the correctness of the output) self.explicitcast = 'explicitcast' in options - # (TODO:) Allow string + key + # TODO: Allow string + key #self.allowkeyconcat = 'allowkeyconcat' in options # Allow C style string composition of strings: "blah" "blah" = "blahblah" self.allowmultistrings = 'allowmultistrings' in options + # TODO: Allow pure C-style string parsing. This is low-priority. + #self.allowcescapes = 'allowcescapes' in options + # Symbol table: # This is a list of all local and global symbol tables. # The first element (0) is the global scope. Each symbol table is a