ThirdParty/Pygments/pygments/lexers/math.py

changeset 808
8f85926125ef
parent 684
2f29a0b6e1c7
child 1705
b0fbc9300f2b
equal deleted inserted replaced
805:83ca4d1ff648 808:8f85926125ef
151 # label to use... 151 # label to use...
152 (r'^!.*', String.Other), 152 (r'^!.*', String.Other),
153 (r'%.*$', Comment), 153 (r'%.*$', Comment),
154 (r'^\s*function', Keyword, 'deffunc'), 154 (r'^\s*function', Keyword, 'deffunc'),
155 155
156 # from 'iskeyword' on version 7.4.0.336 (R2007a): 156 # from 'iskeyword' on version 7.11 (R2010):
157 (r'(break|case|catch|classdef|continue|else|elseif|end|for|function|' 157 (r'(break|case|catch|classdef|continue|else|elseif|end|enumerated|'
158 r'global|if|otherwise|parfor|persistent|return|switch|try|while)\b', 158 r'events|for|function|global|if|methods|otherwise|parfor|'
159 Keyword), 159 r'persistent|properties|return|spmd|switch|try|while)\b', Keyword),
160 160
161 ("(" + "|".join(elfun+specfun+elmat) + r')\b', Name.Builtin), 161 ("(" + "|".join(elfun+specfun+elmat) + r')\b', Name.Builtin),
162 162
163 # operators: 163 # operators:
164 (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator), 164 (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
226 idx = len(curcode) 226 idx = len(curcode)
227 227
228 # without is showing error on same line as before...? 228 # without is showing error on same line as before...?
229 line = "\n" + line 229 line = "\n" + line
230 token = (0, Generic.Traceback, line) 230 token = (0, Generic.Traceback, line)
231 insertions.append( (idx, [token,]) ) 231 insertions.append((idx, [token]))
232 232
233 else: 233 else:
234 if curcode: 234 if curcode:
235 for item in do_insertions( 235 for item in do_insertions(
236 insertions, mlexer.get_tokens_unprocessed(curcode)): 236 insertions, mlexer.get_tokens_unprocessed(curcode)):

eric ide

mercurial