summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-lexer.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-04-25 12:25:52 -0400
committerGitHub <noreply@github.com>2023-04-25 09:25:52 -0700
commit5abee6a0a30c7c965138ec7286b7f1b21b201731 (patch)
tree0469f6f85bac0fcf502a95f2a60c49179349dd17 /source/compiler-core/slang-lexer.cpp
parente5d5e3c215f3300bf447e6ab46cdf8d5c12f58a6 (diff)
StringBuilder to lowerCamel (#2840)
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP lowerCamel Dictionary. * WIP more lowerCamel fixes for Dictionary. * Add/Remove/Clear * GetValue/Contains * Fix tabs in dictionary. Count -> getCount * Fix fields with caps. * Key -> key Value -> value Use m_ for members where appropriate. Use lowerCamel in linked list. * Some small fixes/improvements to Dictionary. * Kick CI. * Small tidy on String. * Append -> append * ToString -> toString ProduceString -> produceString * Small fixes. * StringToXXX -> stringToXXX * Fix typo introduced by Append -> append. * Made intToAscii do reversal at the end. --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/compiler-core/slang-lexer.cpp')
-rw-r--r--source/compiler-core/slang-lexer.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/compiler-core/slang-lexer.cpp b/source/compiler-core/slang-lexer.cpp
index a9d20471a..7bb9aa84d 100644
--- a/source/compiler-core/slang-lexer.cpp
+++ b/source/compiler-core/slang-lexer.cpp
@@ -878,14 +878,14 @@ namespace Slang
if(c == quote)
{
SLANG_ASSERT(cursor == end);
- return valueBuilder.ProduceString();
+ return valueBuilder.produceString();
}
// Characters that don't being escape sequences are easy;
// just append them to the buffer and move on.
if(c != '\\')
{
- valueBuilder.Append(c);
+ valueBuilder.append(c);
continue;
}
@@ -901,19 +901,19 @@ namespace Slang
case '\"':
case '\\':
case '?':
- valueBuilder.Append(d);
+ valueBuilder.append(d);
continue;
// Traditional escape sequences for special characters
- case 'a': valueBuilder.Append('\a'); continue;
- case 'b': valueBuilder.Append('\b'); continue;
- case 'f': valueBuilder.Append('\f'); continue;
- case 'n': valueBuilder.Append('\n'); continue;
- case 'r': valueBuilder.Append('\r'); continue;
- case 't': valueBuilder.Append('\t'); continue;
- case 'v': valueBuilder.Append('\v'); continue;
-
- // Octal escape: up to 3 characterws
+ case 'a': valueBuilder.append('\a'); continue;
+ case 'b': valueBuilder.append('\b'); continue;
+ case 'f': valueBuilder.append('\f'); continue;
+ case 'n': valueBuilder.append('\n'); continue;
+ case 'r': valueBuilder.append('\r'); continue;
+ case 't': valueBuilder.append('\t'); continue;
+ case 'v': valueBuilder.append('\v'); continue;
+
+ // Octal escape: up to 3 characters
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7':
{
@@ -936,7 +936,7 @@ namespace Slang
}
// TODO: add support for appending an arbitrary code point?
- valueBuilder.Append((char) value);
+ valueBuilder.append((char) value);
}
continue;
@@ -970,7 +970,7 @@ namespace Slang
}
// TODO: add support for appending an arbitrary code point?
- valueBuilder.Append((char) value);
+ valueBuilder.append((char) value);
}
continue;