Skip to content

Comments

Fix rust syntax file to recognize byte strings and c strings.#3452

Merged
JoeKar merged 1 commit intomicro-editor:masterfrom
jmcorey:rust_syntax_string_literals_bc
Sep 5, 2024
Merged

Fix rust syntax file to recognize byte strings and c strings.#3452
JoeKar merged 1 commit intomicro-editor:masterfrom
jmcorey:rust_syntax_string_literals_bc

Conversation

@jmcorey
Copy link
Contributor

@jmcorey jmcorey commented Sep 5, 2024

In rust, there are some prefixes that may be part of the string literal. String literals of the form b"test" (and br##"test"## etc) are byte strings (as opposed to unicode strings), and similarly, string literals of the form c"test" are C zero-terminated strings. Hence, added optional prefixes to each of the string regular expressions so the prefix will be recognized as part of the string.

Built and tested after fix.

In rust, there are some prefixes that may be part of the string literal.
String literals of the form b"test" (and br##"test"## etc) are byte
strings (as opposed to unicode strings), and similarly, string literals
of the form c"test" are C zero-terminated strings.  Hence, added optional
prefixes to each of the string regular expressions so the prefix will be
recognized as part of the string.

Built and tested after fix.
@JoeKar JoeKar merged commit 2308bc5 into micro-editor:master Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants