summaryrefslogtreecommitdiff
path: root/pygments/lexers/other.py
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2014-05-18 07:39:47 -0700
committerTim Hatch <tim@timhatch.com>2014-05-18 07:39:47 -0700
commit22603938a79b5c42fd607849608991977ff4ff81 (patch)
treee28671a7b1a06d6a066b55cf6ea67287b4c3a175 /pygments/lexers/other.py
parentcb7de16b36d3ea35968c94b9e6fddab8df0a10c9 (diff)
parent99fba293818c780ce48e990e973c9df24ec6c8c0 (diff)
downloadpygments-22603938a79b5c42fd607849608991977ff4ff81.tar.gz
Merged in jaingaurav2/pygments-main-c-cleanup (pull request #342)
Add ability to specify default state transition
Diffstat (limited to 'pygments/lexers/other.py')
-rw-r--r--pygments/lexers/other.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py
index 779cdece..0c4753ad 100644
--- a/pygments/lexers/other.py
+++ b/pygments/lexers/other.py
@@ -12,7 +12,7 @@
import re
from pygments.lexer import RegexLexer, include, bygroups, using, \
- this, combined, ExtendedRegexLexer
+ this, combined, ExtendedRegexLexer, default
from pygments.token import Error, Punctuation, Literal, Token, \
Text, Comment, Operator, Keyword, Name, String, Number, Generic, \
Whitespace
@@ -403,7 +403,7 @@ class SmalltalkLexer(RegexLexer):
(r'(:)(\s*)(\w+)',
bygroups(Operator, Text, Name.Variable)),
(r'\|', Operator, '#pop'),
- (r'', Text, '#pop'), # else pop
+ default('#pop'), # else pop
],
'literals' : [
(r"'(''|[^'])*'", String, 'afterobject'),
@@ -2607,7 +2607,7 @@ class AwkLexer(RegexLexer):
(r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/'
r'\B', String.Regex, '#pop'),
(r'(?=/)', Text, ('#pop', 'badregex')),
- (r'', Text, '#pop')
+ default('#pop')
],
'badregex': [
(r'\n', Text, '#pop')
@@ -3129,7 +3129,7 @@ class KconfigLexer(RegexLexer):
return [
(_rx_indent(level), String.Doc),
(r'\s*\n', Text),
- (r'', Generic, '#pop:2')
+ default('#pop:2')
]
tokens = {