Branch: refs/heads/master Author: Thomas Martitz thomas.martitz@mailbox.org Committer: Thomas Martitz thomas.martitz@mailbox.org Date: Wed, 04 Oct 2023 19:54:27 UTC Commit: 0f04b2437c4f6e6dd9bd4ed5ace1c27dd16c1efb https://github.com/geany/geany/commit/0f04b2437c4f6e6dd9bd4ed5ace1c27dd16c1e...
Log Message: ----------- Handle new styles for strings in R (rawstrings, backticks, espaces)
Note:With escapes there is still an issue, thus we disable it for now via lexer properties.
See also: https://github.com/ScintillaOrg/lexilla/issues/206
Modified Paths: -------------- data/filedefs/filetypes.r src/highlightingmappings.h
Modified: data/filedefs/filetypes.r 9 lines changed, 8 insertions(+), 1 deletions(-) =================================================================== @@ -13,6 +13,10 @@ string2=string_2 identifier=identifier infix=function infixeol=function +backticks=backticks +stringraw=string_2 +stringraw=string_2 +escapesequence=string_1
[keywords] # all items must be in one line @@ -23,6 +27,10 @@ primary=attach break detach else for function if in library new next repeat requ package=F FALSE Inf NA NA_integer_ NA_real_ NA_character_ NA_complex_ NaN NULL T TRUE package_other=
+[lexer_properties] +# https://github.com/ScintillaOrg/lexilla/issues/206 +#lexer.r.escape.sequence=1 + [settings] # default extension used when saving files extension=R @@ -52,4 +60,3 @@ context_action_cmd= #width=4 # 0 is spaces, 1 is tabs, 2 is tab & spaces #type=1 -
Modified: src/highlightingmappings.h 28 lines changed, 16 insertions(+), 12 deletions(-) =================================================================== @@ -1364,18 +1364,22 @@ static const HLKeyword highlighting_keywords_PYTHON[] = #define highlighting_lexer_R SCLEX_R static const HLStyle highlighting_styles_R[] = { - { SCE_R_DEFAULT, "default", FALSE }, - { SCE_R_COMMENT, "comment", FALSE }, - { SCE_R_KWORD, "kword", FALSE }, - { SCE_R_OPERATOR, "operator", FALSE }, - { SCE_R_BASEKWORD, "basekword", FALSE }, - { SCE_R_OTHERKWORD, "otherkword", FALSE }, - { SCE_R_NUMBER, "number", FALSE }, - { SCE_R_STRING, "string", FALSE }, - { SCE_R_STRING2, "string2", FALSE }, - { SCE_R_IDENTIFIER, "identifier", FALSE }, - { SCE_R_INFIX, "infix", FALSE }, - { SCE_R_INFIXEOL, "infixeol", FALSE } + { SCE_R_DEFAULT, "default", FALSE }, + { SCE_R_COMMENT, "comment", FALSE }, + { SCE_R_KWORD, "kword", FALSE }, + { SCE_R_OPERATOR, "operator", FALSE }, + { SCE_R_BASEKWORD, "basekword", FALSE }, + { SCE_R_OTHERKWORD, "otherkword", FALSE }, + { SCE_R_NUMBER, "number", FALSE }, + { SCE_R_STRING, "string", FALSE }, + { SCE_R_STRING2, "string2", FALSE }, + { SCE_R_IDENTIFIER, "identifier", FALSE }, + { SCE_R_INFIX, "infix", FALSE }, + { SCE_R_INFIXEOL, "infixeol", FALSE }, + { SCE_R_BACKTICKS, "backticks", FALSE }, + { SCE_R_RAWSTRING, "stringraw", FALSE }, + { SCE_R_RAWSTRING2, "stringraw", FALSE }, + { SCE_R_ESCAPESEQUENCE, "escapesequence", FALSE } }; static const HLKeyword highlighting_keywords_R[] = {
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).