summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Li <andy@onthewings.net>2012-11-26 16:46:14 +0800
committerAndy Li <andy@onthewings.net>2012-11-26 16:46:14 +0800
commitfafddd8fe418a973b75210719a53b9aadcbd9734 (patch)
treee53401801cc086188957fdf71516c853572974ac
parentc5489f108b7f5734a43d4e37ce83eed535fded93 (diff)
downloadpygments-fafddd8fe418a973b75210719a53b9aadcbd9734.tar.gz
Avoid popping empty preproc_stack.
-rw-r--r--pygments/lexers/web.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py
index d52a443f..3b4ac872 100644
--- a/pygments/lexers/web.py
+++ b/pygments/lexers/web.py
@@ -1171,7 +1171,7 @@ class HaxeLexer(ExtendedRegexLexer):
ctx.stack = self.preproc_stack[-1]
elif proc == 'end':
# remove the saved stack of previous #if
- self.preproc_stack.pop()
+ if len(self.preproc_stack): self.preproc_stack.pop()
# #if and #elseif should follow by an expr
if proc in ['if', 'elseif']: