From: Leandro Lucarella Date: Sun, 24 Oct 2010 03:35:54 +0000 (-0300) Subject: Mejorar resaltado de pseudocódigo X-Git-Tag: borrador-jurado~7 X-Git-Url: https://git.llucax.com/z.facultad/75.00/informe.git/commitdiff_plain/22f6e916034e77ad97ef915db14079a0078e3f9b Mejorar resaltado de pseudocódigo Agregar varios nombres builtin y pasar global de nombre builtin a keyword. Además inviertir el orden de imports para evitar que se redefina algo que se quería importar explícitamente. --- diff --git a/ext/pcodehl.py b/ext/pcodehl.py index d378df4..8a93cf9 100644 --- a/ext/pcodehl.py +++ b/ext/pcodehl.py @@ -1,6 +1,6 @@ -from pygments.lexer import RegexLexer, include, bygroups, using, this from pygments.token import * +from pygments.lexer import RegexLexer, include, bygroups, using, this class PseudoCodeLexer(RegexLexer): name = 'PseudoCode' @@ -30,9 +30,9 @@ class PseudoCodeLexer(RegexLexer): (r'[~!%^&*+=|?:<>/-]', Operator), (r'[()\[\],.]', Punctuation), (r'(auto|break|continue|else|function|is|in|not|and|or|while|' - r'foreach|if|return|throw|do|cast)\b', Keyword), - (r'(true|false|null|global|exit|fflush|fork|wait|try_wait)\b', - Name.Builtin), + r'foreach|if|return|throw|do|cast|global)\b', Keyword), + (r'(true|false|null|exit|fflush|fork|wait|try_wait|void|byte|' + r'thread_self|get_stack_top|pause|resume)\b', Name.Builtin), ('[a-zA-Z_][a-zA-Z0-9_]*', Name), ], 'root': [