diff options
author | Georg Brandl <georg@python.org> | 2014-04-22 10:13:48 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-04-22 10:13:48 +0200 |
commit | 545b0f4ca5a80dea21142b538390378d1e48e2ce (patch) | |
tree | 5d43db8597a63d483fb9809192ba3cd7f9a50889 /pygments | |
parent | 7458f6a2e18573a054595bbb04b9464d50ce4b5a (diff) | |
parent | aab94617543ebc97a32614f7585bdee58b2bd090 (diff) | |
download | pygments-545b0f4ca5a80dea21142b538390378d1e48e2ce.tar.gz |
Merged in dietmarw/pygments-main (pull request #324)
Corrects class name detection and adds missing function names.
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/other.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py index c308c884..306ae326 100644 --- a/pygments/lexers/other.py +++ b/pygments/lexers/other.py @@ -1309,8 +1309,6 @@ class ModelicaLexer(RegexLexer): r'([\[\d,:\]]*)' r'(\.([a-zA-Z_][\w]*|[\'][^\']+[\']))+' r'([\[\d,:\]]*)', Name.Class), - (r'([a-zA-Z_][\w]*|[\'][^\']+[\'])' - r'([\[\d,:\]]+)', Name.Class), (r'(\'[\w\+\-\*\/\^]+\'|\w+)', Name), (r'[()\[\]{},.;]', Punctuation), (r'\'', Name, 'quoted_ident'), @@ -1335,9 +1333,11 @@ class ModelicaLexer(RegexLexer): ], 'functions': [ (r'(abs|acos|acosh|asin|asinh|atan|atan2|atan3|ceil|cos|cosh|' - r'cross|div|exp|floor|getInstanceName|log|log10|mod|rem|' - r'semiLinear|sign|sin|sinh|size|spatialDistribution|sqrt|tan|' - r'tanh|zeros)\b', Name.Function), + r'cross|diagonal|div|exp|fill|floor|getInstanceName|identity|' + r'linspace|log|log10|matrix|mod|max|min|ndims|ones|outerProduct|' + r'product|rem|scalar|semiLinear|skew|sign|sin|sinh|size|' + r'spatialDistribution|sum|sqrt|symmetric|tan|tanh|transpose|' + r'vector|zeros)\b', Name.Function), ], 'operators': [ (r'(actualStream|and|assert|backSample|cardinality|change|Clock|' @@ -1347,8 +1347,9 @@ class ModelicaLexer(RegexLexer): r'terminate)\b', Name.Builtin), ], 'classes': [ - (r'(operator)?(\s+)?(block|class|connector|end|function|model|operator|package|' - r'record|type)(\s+)((?!if|when|while)[A-Za-z_]\w*|[\'][^\']+[\'])([;]?)', + (r'(operator)?(\s+)?(block|class|connector|end|function|model|' + r'operator|package|record|type)(\s+)' + r'((?!if|for|when|while)[A-Za-z_]\w*|[\'][^\']+[\'])([;]?)', bygroups(Keyword, Text, Keyword, Text, Name.Class, Text)) ], 'quoted_ident': [ |