Whoops, messed that up good.

This commit is contained in:
Stéphan Kochen 2004-02-18 16:21:07 +00:00
parent f08f875d3c
commit 52e7551493

View File

@ -187,12 +187,15 @@ class Tokenizer:
token = lexer.get_token()
if not token:
raise SyntaxError, 'Missing "]"'
elif token == ']':
elif conf.supybot.bracketSyntax():
if token == ']':
return ret
elif token == '[':
ret.append(self._insideBrackets(lexer))
else:
ret.append(self._handleToken(token))
else:
ret.append(self._handleToken(token))
return ret
def tokenize(self, s):
@ -219,6 +222,8 @@ class Tokenizer:
raise SyntaxError, 'Spurious "["'
else:
args.append(self._handleToken(token))
else:
args.append(self._handleToken(token))
if ends:
if not args:
raise SyntaxError, '"|" with nothing following'