Fixed some typos.

This commit is contained in:
Jeremy Fincher 2004-02-20 06:32:39 +00:00
parent 58decb39a9
commit 39bbf683fb

View File

@ -186,7 +186,7 @@ class Tokenizer:
while True: while True:
token = lexer.get_token() token = lexer.get_token()
if not token: if not token:
raise SyntaxError, 'Missing "]"' raise SyntaxError, 'Missing "]".'
elif token == ']': elif token == ']':
return ret return ret
elif token == '[': elif token == '[':
@ -209,21 +209,21 @@ class Tokenizer:
break break
elif token == '|' and conf.supybot.pipeSyntax(): elif token == '|' and conf.supybot.pipeSyntax():
if not args: if not args:
raise SyntaxError, '"|" with nothing preceding' raise SyntaxError, '"|" with nothing preceding.'
ends.append(args) ends.append(args)
args = [] args = []
elif conf.supybot.bracketSyntax(): elif conf.supybot.bracketSyntax():
if token == '[': if token == '[':
args.append(self._insideBrackets(lexer)) args.append(self._insideBrackets(lexer))
elif token == ']': elif token == ']':
raise SyntaxError, 'Spurious "["' raise SyntaxError, 'Spurious "]".'
else: else:
args.append(self._handleToken(token)) args.append(self._handleToken(token))
else: else:
args.append(self._handleToken(token)) args.append(self._handleToken(token))
if ends: if ends:
if not args: if not args:
raise SyntaxError, '"|" with nothing following' raise SyntaxError, '"|" with nothing following.'
args.append(ends.pop()) args.append(ends.pop())
while ends: while ends:
args[-1].append(ends.pop()) args[-1].append(ends.pop())