From ab8f8a28a99709d28a0510441fe248e41b1b16aa Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sat, 7 Jan 2017 20:24:28 +0100 Subject: [PATCH] 'default' is also a switch keyword. This is academic, because 'default' is also an LSL keyword, which is why it wasn't included, but just for correctness' sake, we add it. --- lslopt/lslparse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lslopt/lslparse.py b/lslopt/lslparse.py index afc1e3a..52e18fb 100644 --- a/lslopt/lslparse.py +++ b/lslopt/lslparse.py @@ -188,10 +188,10 @@ class parser(object): # These are hardcoded because additions or modifications imply # important changes to the code anyway. - base_keywords = frozenset(('default', 'state', 'event', 'jump', 'return', 'if', - 'else', 'for', 'do', 'while', 'print', 'TRUE', 'FALSE')) + base_keywords = frozenset(('default', 'state', 'event', 'jump', 'return', + 'if', 'else', 'for', 'do', 'while', 'print', 'TRUE', 'FALSE')) brkcont_keywords = frozenset(('break', 'continue')) - switch_keywords = frozenset(('switch', 'case', 'break')) + switch_keywords = frozenset(('switch', 'case', 'break', 'default')) types = frozenset(('integer','float','string','key','vector', 'quaternion','rotation','list')) PythonType2LSL = {int: 'integer', float: 'float',