|
|
|
|
- Propiedades específicas de las variables de tipo WLanguageCodeFormatting
- Funciones WLanguage que utilizan variables de tipo WLanguageCodeFormatting
WLanguageCodeFormatting (Tipo de variable)
El tipo WLanguageCodeFormatting permite definir todas las opciones de formato del código WLanguage. Estas opciones se pueden definir y cambiar utilizando diferentes propiedades WLanguage. Observación: Para obtener más información sobre la declaración de este tipo de variable y el uso de propiedades WLanguage, consulte Declarar una variable.
sCode is ANSI string = "
CodeFormatting is WLanguageCodeFormatting
CodeFormatting.Language = languageEnglish
CodeFormatting.Indentation = True
CodeFormatting.IncludeCSSDeclarations = True
CodeFormatting.IgnoreCompilationError = True
CodeFormatting.KeywordCase = WLanguageCodeKeywordLowercase
CodeFormatting.Theme = WLanguageCodeThemeDark
CodeFormatting.Format = WLanguageCodeFormatHTML
bufHTMLRes is Buffer = CodeFormatting.Format(sCode)
"
CodeFormatting is WLanguageCodeFormatting
CodeFormatting.Language = languageEnglish
CodeFormatting.Indentation = True
CodeFormatting.IncludeCSSDeclarations = True
CodeFormatting.IgnoreCompilationError = True
CodeFormatting.KeywordCase = WLanguageCodeKeywordLowercase
CodeFormatting.Theme = WLanguageCodeThemeDark
CodeFormatting.Format = WLanguageCodeFormatHTML
bufHTMLRes is Buffer = WLanguageCodeFormatting(CodeFormatting, sCode)
HTM_NoName1 = UTF8ToString(bufHTMLRes)
Propiedades Propiedades específicas de las variables de tipo WLanguageCodeFormatting Las siguientes propiedades pueden utilizarse para manipular las opciones de formato de código WLanguage: | | | Nombre de la propiedad | Tipo utilizado | Efecto |
---|
KeywordCase | Constante de tipo Integer | Caracteres en mayúsculas o minúsculas para las palabras clave: - WLanguageCodeKeywordUppercase: Palabras clave en mayúsculas.
- WLanguageCodeKeywordLowercase: Palabras clave en minúsculas.
| Compilation | Variable de tipo WLanguageCodeCompiling | Opciones de compilación (funciones permitidas, funciones prohibidas, etc.). | Format | Constante de tipo Integer | Formato del código:- WLanguageCodeFormatText (Valor predeterminado): Texto simple.
- WLanguageCodeFormatHTML: Texto en formato HTML.
| IgnoreCompilationError | Boolean | - True para ignorar los errores de compilación. El formato y el resaltado de sintaxis serán menos precisos.
- False (valor predeterminado) en caso contrario.
| IncludeCSSDeclarations | Boolean | - True (valor predeterminado) para incluir en el código las declaraciones CSS necesarias para el formato y el resaltado de código. Esta propiedad solo se tiene en cuenta si se asigna la constante WLanguageCodeFormatHTML a la propiedad Format.
- False para no incluir las declaraciones CSS. En este caso, es posible obtenerlas utilizando la función WLanguageCodeGetCSSDeclarations.
| Indentation | Boolean | - True para activar la sangría,
- False (valor predeterminado) para desactivar la sangría.
| Language | Constante de tipo Integer | Idioma del código que se va a generar: - 0 (Valor predeterminado): sin traducción, el código permanece en el idioma actual.
- languageFrench: el código se traduce al francés.
- languageEnglish: el código se traduce al inglés.
Observación: Solo se traducen las palabras clave, los tipos de variables, las funciones y las propiedades. | Theme | Constante de tipo Integer | Tema utilizado para el resaltado de sintaxis: - WLanguageCodeThemeLight: Se utiliza el tema claro.
- WLanguageCodeThemeGray: Se utiliza el tema gris.
- WLanguageCodeThemeDark: Se utiliza el tema oscuro.
|
Observaciones Funciones WLanguage que utilizan variables de tipo WLanguageCodeFormatting Las variables de tipo WLanguageCodeFormatting pueden manipularse utilizando las siguientes funciones WLanguage:
| | | Aplica formato al código WLanguage: resaltado de sintaxis, estandarización de estilos, sangría, traducción, etc. |
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|