diff --git a/grammars/MagicPython.cson b/grammars/MagicPython.cson index 6486dba..f7f460b 100644 --- a/grammars/MagicPython.cson +++ b/grammars/MagicPython.cson @@ -37,7 +37,7 @@ repository: statement: patterns: [ { - include: "#import" + include: "#importar" } { include: "#class-declaration" @@ -108,10 +108,10 @@ repository: match: ''' (?x) (?" @@ -2176,7 +2176,7 @@ repository: } ] codetags: - match: "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)" + match: "(?:\\b(NOTAR|XXX|HACKEAR|ARREGLARME|BICHO|HACER)\\b)" captures: "1": name: "keyword.codetag.notation.python" diff --git a/grammars/MagicPython.tmLanguage b/grammars/MagicPython.tmLanguage index 5a07f54..3ea2353 100644 --- a/grammars/MagicPython.tmLanguage +++ b/grammars/MagicPython.tmLanguage @@ -57,7 +57,7 @@ include - #import + #importar include @@ -156,10 +156,10 @@ match (?x) (?<!\.)\b( - bool | bytes | float | int | object | str - | List | Dict | Iterable | Sequence | Set - | FrozenSet | Callable | Union | Tuple - | Any | None + bool | bytes | flotador | núm | objeto | str + | Lista | Dicc | Itreable | Secuencia | Conjunto + | FrozenSet | Llamable | Unión | Tupla + | Cualquiara | Ningún )\b @@ -433,15 +433,15 @@ it's probably control flow like: pass match - \b(?<!\.)as\b(?=.*[:\\]) + \b(?<!\.)como\b(?=.*[:\\]) name - keyword.control.import.python + keyword.control.importar.python comment - other legal use of `as` is in an import + other legal use of `as` is in an importar match - \b(?<!\.)as\b + \b(?<!\.)como\b name @@ -449,9 +449,9 @@ it's probably control flow like: match (?x) \b(?<!\.)( - async | continue | del | assert | break | finally | for - | from | elif | else | if | except | pass | raise - | return | try | while | with + async | continuar | borrar | afirmar | cortar | finalmente | para + | desde | otro_si | otro | si | excepto | pasar | plantear + | devolver | intentar | mientras | con )\b @@ -461,7 +461,7 @@ it's probably control flow like: match (?x) \b(?<!\.)( - global | nonlocal + global | ~local )\b @@ -469,7 +469,7 @@ it's probably control flow like: name storage.type.class.python match - \b(?<!\.)(class)\b + \b(?<!\.)(clase)\b @@ -922,9 +922,9 @@ E.g. "arr[idx](args)" (?x) \b(?<!\.) (?: - (and | or | not | in | is) (?# 1) + (y | o | ~ | en | es) (?# 1) | - (for | if | else | await | (?:yield(?:\s+from)?)) (?# 2) + (para | si | otro | aguardar | (?:ceder(?:\\s+desde)?)) (?# 2) ) (?!\s*:)\b @@ -989,7 +989,7 @@ E.g. "arr[idx](args)" name constant.language.python match - \b(True|False|None|NotImplemented|Ellipsis)\b + \b(Verdadero|Falso|Ningún|No_se_ha_implementado|Elipsis)\b include @@ -1605,24 +1605,24 @@ E.g. "arr[idx](args)" match (}(?!})) - import + importar comment - Import statements used to correctly mark `from`, `import`, and `as` + importar statements used to correctly mark `from`, `importar`, and `as` patterns begin - \b(?<!\.)(from)\b(?=.+import) + \b(?<!\.)(desde)\b(?=.+importar) end - $|(?=import) + $|(?=importar) beginCaptures 1 name - keyword.control.import.python + keyword.control.importar.python patterns @@ -1641,7 +1641,7 @@ E.g. "arr[idx](args)" begin - \b(?<!\.)(import)\b + \b(?<!\.)(importar)\b end $ beginCaptures @@ -1649,16 +1649,16 @@ E.g. "arr[idx](args)" 1 name - keyword.control.import.python + keyword.control.importar.python patterns name - keyword.control.import.python + keyword.control.importar.python match - \b(?<!\.)as\b + \b(?<!\.)como\b include @@ -1677,7 +1677,7 @@ E.g. "arr[idx](args)" meta.class.python begin (?x) - \s*(class)\s+ + \s*(clase)\s+ (?= [[:alpha:]_]\w* \s* (:|\() ) @@ -1784,7 +1784,7 @@ E.g. "arr[idx](args)" name support.type.metaclass.python match - \bmetaclass\b + \bmetaclase\b include @@ -2244,7 +2244,7 @@ correctly identify the "in" as a control flow keyword. match (?x) - \b ((self)|(cls)) \b \s*(?:(,)|(?=\))) + \b ((mismo)|(cls)) \b \s*(?:(,)|(?=\))) captures @@ -2816,26 +2816,26 @@ correctly identify the "in" as a control flow keyword. match (?x) (?<!\.) \b( ( - Arithmetic | Assertion | Attribute | Buffer | BlockingIO - | BrokenPipe | ChildProcess - | (Connection (Aborted | Refused | Reset)?) - | EOF | Environment | FileExists | FileNotFound - | FloatingPoint | IO | Import | Indentation | Index | Interrupted - | IsADirectory | NotADirectory | Permission | ProcessLookup - | Timeout - | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow - | Reference | Runtime | Recursion | Syntax | System - | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)? - | Value | Windows | ZeroDivision | ModuleNotFound - ) Error -| - ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import - | Unicode | Bytes | Resource - )? Warning -| - SystemExit | Stop(Async)?Iteration - | KeyboardInterrupt - | GeneratorExit | (Base)?Exception + Aritmética | Afirmación | Atributo | Búfer | BloqueandoIO + | TuberíaRota | ProcessoInfantil + | (Conexión (Abortada | Rechazada | Reiniciada)?) + | EOF | MedioAmbiente | ArchivoExiste | ArchivoNoEncontrado + | FlotatingPoint | IO | importaración | Muesca | Índice | Interrumpido + | EsADirectorio | NoADirectorio | Permiso | ProcesoBùsqueda + | SeAcabóElTiempo + | Clave | Búsqueda | Memoria | Nombre | NoSeHaImplementado | OS | Desbordamiento + | Referencia | TiempoDeEjecución | Recursión | Sintaxis | Sistema + | Pestaña | Tipo | SueltoLocal | Unicode(Codificar|Descodificar|Traducir)? + | Valor | Windows | CeroDivisión | MóduloNoEncontrado + ) Error + | + ((Pendiente)?Deprecation | TiempoDeEjecución | Sintaxis | Usario | Futuro | importar + | Unicode | Bytes | Recurso + )? Aviso + | + SistemaSalida | Para(Async)?Iteración + | TecladoInterruptado + | GeneradorSalida | (Base)?Excepción )\b @@ -2849,14 +2849,14 @@ correctly identify the "in" as a control flow keyword. match (?x) (?<!\.) \b( - __import__ | abs | all | any | ascii | bin | breakpoint | callable - | chr | compile | copyright | credits | delattr | dir | divmod - | enumerate | eval | exec | exit | filter | format | getattr - | globals | hasattr | hash | help | hex | id | input - | isinstance | issubclass | iter | len | license | locals | map - | max | memoryview | min | next | oct | open | ord | pow | print - | quit | range | reload | repr | reversed | round - | setattr | sorted | sum | vars | zip + __importar__ | abs | todo | cualquiara | ascii | contenedor | punto_de_ruptura | llamable + | chr | compilar | copyright | créditos | borraratri | dir | divmod + | enumerar | eval | ejec | salir | filtro | formato | obteneratri + | globals | teneratri | hash | ayudar | hex | id | entrada + | escaso | essubclase | iter | lar | licencia | locales | mapa + | max | memoriavista | min | siguiente | oct | abrir | ord | pot | imprimir + | dejar | rango | recargar | repr | invertido | redondear + | poneratri | ordenado | suma | vars | comprimir )\b @@ -2866,8 +2866,8 @@ correctly identify the "in" as a control flow keyword. match (?x) (?<!\.) \b( - file | reduce | intern | raw_input | unicode | cmp | basestring - | execfile | long | xrange + archivo | reducir | pasante | entrada_sin_procesar | unicode | cmp | baseguirnalda + | ejecarchivo | largo | xrango )\b @@ -2880,14 +2880,14 @@ correctly identify the "in" as a control flow keyword. match (?x) (?<!\.) \b( - bool | bytearray | bytes | classmethod | complex | dict - | float | frozenset | int | list | object | property - | set | slice | staticmethod | str | tuple | type - - (?# Although 'super' is not a type, it's related to types, - and is special enough to be highlighted differently from - other built-ins) - | super + bool | matrizdebytes | bytes | métododeclase | complejo | dicc + | flotador | conjuntocongelado | núm | lista | objeto | propriedad + | conjunto | rebanar | métodoestático | guir | tupla | tipo + + (?# Although 'super' is not a type, it's related to types, + and is special enough to be highlighted differently from + other built-ins) + | súper )\b @@ -2901,24 +2901,24 @@ indirectly through syntactic constructs (?x) \b( __(?: - abs | add | aenter | aexit | aiter | and | anext | await - | bool | call | ceil | cmp | coerce | complex | contains - | copy | deepcopy | del | delattr | delete | delitem - | delslice | dir | div | divmod | enter | eq | exit | float - | floor | floordiv | format | ge | get | getattr - | getattribute | getinitargs | getitem | getnewargs - | getslice | getstate | gt | hash | hex | iadd | iand | idiv - | ifloordiv | ilshift | imod | imul | index | init - | instancecheck | int | invert | ior | ipow | irshift | isub - | iter | itruediv | ixor | le | len | long | lshift | lt - | missing | mod | mul | ne | neg | new | next | nonzero | oct | or - | pos | pow | radd | rand | rdiv | rdivmod | reduce - | reduce_ex | repr | reversed | rfloordiv | rlshift | rmod - | rmul | ror | round | rpow | rrshift | rshift | rsub - | rtruediv | rxor | set | setattr | setitem | setslice - | setstate | sizeof | str | sub | subclasscheck | truediv - | trunc | unicode | xor | matmul | rmatmul | imatmul - | init_subclass | set_name | fspath | bytes | prepare + abs | añadir | aentrar | asalir | aiter | and | anext | await + | bool | llamar | techo | cmp | coaccionar | complejo | contener + | copia | copiaprofunda | borrar | borraratri | borrar | borrarartículo + | borrarparte | dir | div | divmod | entrar | eq | salir | flotador + | piso | pisodiv | formato | ge | obtener | obteneratri + | obteneratributo | obtenerparámetrosiniciales | obtenerartículo | obtenerparámetrosnuevos + | obtenerparte | obtenerestado | gt | hash | hex | iañadir | iy | idiv + | ipisodiv | iizqmover | imod | imul | índice | inicializar + | casochequeo | núm | invertir | ior | ipot | idmover | isub + | iter | idivverdadero | ixor | le | lar | largo | izqmover | lt + | perdido | mod | mul | ne | neg | nuevo | siguiente | nocero | oct | or + | pos | pot | radd | azar | ddiv | ddivmod | reducir + | reducir_ex | repr | invertido | dpisodiv | dizqmover | dmod + | dmul | dor | redondear | dpot | ddmover | dmover | dsub + | ddivverdadero | dxor | poner | poneratri | ponerartículo | ponerparte + | ponerestado | tamañode | str | sub | subclasechequeo | divverdadero + | trunc | unicode | xor | matmul | dmatmul | imatmul + | subclase_initializar | poner_nombre | fscamino | bytes | preparar )__ )\b @@ -2939,12 +2939,12 @@ indirectly through syntactic constructs (?x) \b( __(?: - all | bases | builtins | class | class_getitem | code | debug - | defaults | dict | doc | file | func | kwdefaults | members - | metaclass | methods | module | mro | mro_entries | name - | qualname | post_init | self | signature | slots | subclasses - | version | weakref | wrapped | annotations | classcell - | spec | path | package | future | traceback + todo | bases | incorporados | clase | clase_obtenerartículo | código | depurar + | los_valores_por_defecto | dicc | doc | archivo | func | kw_los_valores_por_defecto | miembros + | metaclase | métodos | módulo | mro | mro_entradas | nombre + | qualnombre | post_inicial | mismo | firma | ranuras | subclases + | version | débilref | envuelto | anotaciones | classcelda + | espec | camino | paquete | futuro | localizaratrás )__ )\b @@ -2977,13 +2977,13 @@ indirectly through syntactic constructs (?x) \b(?: ( - and | assert | async | await | break | class | continue | def - | del | elif | else | except | finally | for | from | global - | if | in | is | (?<=\.)lambda | lambda(?=\s*[\.=]) - | nonlocal | not | or | pass | raise | return | try | while | with - | yield - ) | ( - as | import + y | afirmar | async | aguardar | cortar | clase | continuar | def + | borrar | otro_si | otro | excepto | finalmente | para | desde | global + | si | en | es | (?<=\\.)lambda | lambda(?=\\s*[\\.=]) + | ~local | ~ | o | pasar | plantear | devolver | intentar | mientras | con + | ceder + ) | ( + como | importar ) )\b @@ -2997,7 +2997,7 @@ indirectly through syntactic constructs 2 name - keyword.control.import.python + keyword.control.importar.python @@ -3006,7 +3006,7 @@ indirectly through syntactic constructs match (?x) \b (?<!\.) (?: - (self) | (cls) + (mismo) | (cls) )\b captures @@ -3079,7 +3079,7 @@ indirectly through syntactic constructs name keyword.illegal.name.python match - \b(True|False|None)\b + \b(Verdadero|Falso|Ningún)\b illegal-anno @@ -3373,7 +3373,7 @@ indirectly through syntactic constructs codetags match - (?:\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\b) + (?:\b(NOTAR|XXX|HACKEAR|ARREGLARME|BICHO|HACER)\b) captures 1 diff --git a/grammars/src/MagicPython.syntax.yaml b/grammars/src/MagicPython.syntax.yaml index 9c80c8b..6247b8e 100644 --- a/grammars/src/MagicPython.syntax.yaml +++ b/grammars/src/MagicPython.syntax.yaml @@ -263,10 +263,10 @@ repository: match: | (?x) (?