summaryrefslogtreecommitdiff
path: root/scripts/find_error.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2007-12-14 23:25:43 +0100
committergbrandl <devnull@localhost>2007-12-14 23:25:43 +0100
commit0182784abdb8868be299135918a32cc5624dd573 (patch)
tree29f27fa6c1e760a9bea2a25a43ddeb2230782f71 /scripts/find_error.py
parent46be17df1fa6309d163f8721bfbc7320c75e4b40 (diff)
downloadpygments-0182784abdb8868be299135918a32cc5624dd573.tar.gz
Add Smalltalk lexer, #300.
Diffstat (limited to 'scripts/find_error.py')
-rw-r--r--scripts/find_error.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/find_error.py b/scripts/find_error.py
index e210028a..a7719b3f 100644
--- a/scripts/find_error.py
+++ b/scripts/find_error.py
@@ -40,12 +40,17 @@ def main(fn):
for type, val in lx.get_tokens(text):
if type == Error:
print "Error parsing", fn
- print "\n".join([' ' + repr(x) for x in ntext[-5:]])
+ print "\n".join([' ' + repr(x) for x in ntext[-num:]])
print `val` + "<<<"
return
ntext.append((type,val))
+num = 10
+
if __name__ == "__main__":
+ if sys.argv[1][:2] == '-n':
+ num = int(sys.argv[1][2:])
+ del sys.argv[1]
for f in sys.argv[1:]:
main(f)