summaryrefslogtreecommitdiff
path: root/pygments/lexers/other.py
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2014-04-14 13:47:40 -0400
committerTim Hatch <tim@timhatch.com>2014-04-14 13:47:40 -0400
commit06a720cca67ff19f873f8066c17cf4ea90ab0f0f (patch)
tree2901fe8e218cce5a8e788645d41aec654f297e23 /pygments/lexers/other.py
parent02683b5def213065f6b893f91fc54f313141fbdf (diff)
parent5d57fe78405ac06a306f5ed2dd1b630a909cbdfb (diff)
downloadpygments-06a720cca67ff19f873f8066c17cf4ea90ab0f0f.tar.gz
Merged in yloiseau/pygments-main (pull request #309)
Diffstat (limited to 'pygments/lexers/other.py')
-rw-r--r--pygments/lexers/other.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py
index 1b8ce892..ba777e28 100644
--- a/pygments/lexers/other.py
+++ b/pygments/lexers/other.py
@@ -1235,9 +1235,9 @@ class ModelicaLexer(RegexLexer):
'root': [
include('whitespace'),
include('keywords'),
+ include('classes'),
include('functions'),
include('operators'),
- include('classes'),
(r'("<html>|<html>)', Name.Tag, 'html-content'),
include('statements'),
],
@@ -1264,9 +1264,9 @@ class ModelicaLexer(RegexLexer):
r'terminate)\b', Name.Builtin),
],
'classes': [
- (r'(block|class|connector|end|function|model|package|'
+ (r'(operator)?(\s+)?(block|class|connector|end|function|model|operator|package|'
r'record|type)(\s+)((?!if|when|while)[A-Za-z_]\w*|[\'][^\']+[\'])([;]?)',
- bygroups(Keyword, Text, Name.Class, Text))
+ bygroups(Keyword, Text, Keyword, Text, Name.Class, Text))
],
'quoted_ident': [
(r'\'', Name, '#pop'),
@@ -2528,11 +2528,11 @@ class AwkLexer(RegexLexer):
'root': [
(r'^(?=\s|/)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
- (r'\+\+|--|\|\||&&|in|\$|!?~|'
+ (r'\+\+|--|\|\||&&|in\b|\$|!?~|'
r'(\*\*|[-<>+*%\^/!=])=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
- (r'(break|continue|do|while|exit|for|if|'
+ (r'(break|continue|do|while|exit|for|if|else|'
r'return)\b', Keyword, 'slashstartsregex'),
(r'function\b', Keyword.Declaration, 'slashstartsregex'),
(r'(atan2|cos|exp|int|log|rand|sin|sqrt|srand|gensub|gsub|index|'