summaryrefslogtreecommitdiff
path: root/pygments/lexers/floscript.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2019-05-28 07:00:40 +0200
committerGeorg Brandl <georg@python.org>2019-05-28 07:00:40 +0200
commit0eca5a9db1b3c1f169f3fabda9fe9b72876a6056 (patch)
treee726dacdc08cff04bfa8cbe4bad9cc4db471db79 /pygments/lexers/floscript.py
parentffc920fcaaa6e220be32e07db7e3d001dc9a4f03 (diff)
downloadpygments-0eca5a9db1b3c1f169f3fabda9fe9b72876a6056.tar.gz
Fixup all headers and some more minor problems.2.4.2
Diffstat (limited to 'pygments/lexers/floscript.py')
-rw-r--r--pygments/lexers/floscript.py30
1 files changed, 13 insertions, 17 deletions
diff --git a/pygments/lexers/floscript.py b/pygments/lexers/floscript.py
index 4f200809..d5744331 100644
--- a/pygments/lexers/floscript.py
+++ b/pygments/lexers/floscript.py
@@ -5,20 +5,16 @@
Lexer for FloScript
- :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
-import re
-
-from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \
- default, words, combined, do_insertions
-from pygments.util import get_bool_opt, shebang_matches
+from pygments.lexer import RegexLexer, include
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
- Number, Punctuation, Generic, Other, Error
-from pygments import unistring as uni
+ Number, Punctuation
+
+__all__ = ['FloScriptLexer']
-__all__ = ['FloScriptLexer',]
class FloScriptLexer(RegexLexer):
"""
@@ -44,7 +40,6 @@ class FloScriptLexer(RegexLexer):
# newlines are an error (use "nl" state)
]
-
tokens = {
'root': [
(r'\n', Text),
@@ -53,15 +48,19 @@ class FloScriptLexer(RegexLexer):
(r'[]{}:(),;[]', Punctuation),
(r'\\\n', Text),
(r'\\', Text),
- (r'(to|by|with|from|per|for|cum|qua|via|as|at|in|of|on|re|is|if|be|into|and|not)\b', Operator.Word),
+ (r'(to|by|with|from|per|for|cum|qua|via|as|at|in|of|on|re|is|if|be|into|'
+ r'and|not)\b', Operator.Word),
(r'!=|==|<<|>>|[-~+/*%=<>&^|.]', Operator),
- (r'(load|init|server|logger|log|loggee|first|over|under|next|done|timeout|repeat|native|benter|enter|recur|exit|precur|renter|rexit|print|put|inc|copy|set|aux|rear|raze|go|let|do|bid|ready|start|stop|run|abort|use|flo|give|take)\b', Name.Builtin),
- (r'(frame|framer|house)\b', Keyword),
+ (r'(load|init|server|logger|log|loggee|first|over|under|next|done|timeout|'
+ r'repeat|native|benter|enter|recur|exit|precur|renter|rexit|print|put|inc|'
+ r'copy|set|aux|rear|raze|go|let|do|bid|ready|start|stop|run|abort|use|flo|'
+ r'give|take)\b', Name.Builtin),
+ (r'(frame|framer|house)\b', Keyword),
('"', String, 'string'),
include('name'),
include('numbers'),
- (r'#.+$', Comment.Singleline),
+ (r'#.+$', Comment.Singleline),
],
'string': [
('[^"]+', String),
@@ -81,7 +80,4 @@ class FloScriptLexer(RegexLexer):
(r'@[\w.]+', Name.Decorator),
(r'[a-zA-Z_]\w*', Name),
],
-
-
-
}