From 22f6e916034e77ad97ef915db14079a0078e3f9b Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 24 Oct 2010 00:35:54 -0300 Subject: [PATCH] =?utf8?q?Mejorar=20resaltado=20de=20pseudoc=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- ext/pcodehl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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': [ -- 2.43.0