summaryrefslogtreecommitdiffstats
path: root/source/slang/preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/preprocessor.cpp')
-rw-r--r--source/slang/preprocessor.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/slang/preprocessor.cpp b/source/slang/preprocessor.cpp
index 103db7dcb..bf6f7b7ca 100644
--- a/source/slang/preprocessor.cpp
+++ b/source/slang/preprocessor.cpp
@@ -564,7 +564,7 @@ static void AddEndOfStreamToken(
{
Token token = PeekRawToken(preprocessor);
token.type = TokenType::EndOfFile;
- macro->tokens.mTokens.Add(token);
+ macro->tokens.mTokens.add(token);
}
static SimpleTokenInputStream* createSimpleInputStream(
@@ -574,13 +574,13 @@ static SimpleTokenInputStream* createSimpleInputStream(
SimpleTokenInputStream* inputStream = new SimpleTokenInputStream();
initializeInputStream(preprocessor, inputStream);
- inputStream->lexedTokens.mTokens.Add(token);
+ inputStream->lexedTokens.mTokens.add(token);
Token eofToken;
eofToken.type = TokenType::EndOfFile;
eofToken.loc = token.loc;
eofToken.flags = TokenFlag::AfterWhitespace | TokenFlag::AtStartOfLine;
- inputStream->lexedTokens.mTokens.Add(eofToken);
+ inputStream->lexedTokens.mTokens.add(eofToken);
inputStream->tokenReader = TokenReader(inputStream->lexedTokens);
@@ -659,7 +659,7 @@ static void MaybeBeginMacroExpansion(
expansion->environment = &expansion->argumentEnvironment;
// Try to read any arguments present.
- UInt paramCount = macro->params.Count();
+ UInt paramCount = macro->params.getCount();
UInt argIndex = 0;
switch (PeekRawTokenType(preprocessor))
@@ -740,7 +740,7 @@ static void MaybeBeginMacroExpansion(
}
// Add the token and continue parsing.
- arg->tokens.mTokens.Add(AdvanceRawToken(preprocessor));
+ arg->tokens.mTokens.add(AdvanceRawToken(preprocessor));
}
doneWithArgument: {}
// We've parsed an argument and should move onto
@@ -1586,7 +1586,7 @@ static SlangResult readFile(
//
auto linkage = context->preprocessor->linkage;
auto fileSystemExt = linkage->getFileSystemExt();
- SLANG_RETURN_ON_FAIL(fileSystemExt->loadFile(path.Buffer(), outBlob));
+ SLANG_RETURN_ON_FAIL(fileSystemExt->loadFile(path.getBuffer(), outBlob));
// If we are running the preprocessor as part of compiling a
// specific module, then we must keep track of the file we've
@@ -1732,7 +1732,7 @@ static void HandleDefineDirective(PreprocessorDirectiveContext* context)
// are not allowed to be used as macros or parameters).
// Add the parameter to the macro being deifned
- macro->params.Add(paramToken);
+ macro->params.add(paramToken);
// If we see `)` then we are done with arguments
if (PeekRawTokenType(context) == TokenType::RParent)
@@ -1755,12 +1755,12 @@ static void HandleDefineDirective(PreprocessorDirectiveContext* context)
// Last token on line will be turned into a conceptual end-of-file
// token for the sub-stream that the macro expands into.
token.type = TokenType::EndOfFile;
- macro->tokens.mTokens.Add(token);
+ macro->tokens.mTokens.add(token);
break;
}
// In the ordinary case, we just add the token to the definition
- macro->tokens.mTokens.Add(token);
+ macro->tokens.mTokens.add(token);
}
}
@@ -1939,7 +1939,7 @@ static const PragmaDirective kUnknownPragmaDirective = {
// Look up the `#pragma` directive with the given name.
static PragmaDirective const* findPragmaDirective(String const& name)
{
- char const* nameStr = name.Buffer();
+ char const* nameStr = name.getBuffer();
for (int ii = 0; kPragmaDirectives[ii].name; ++ii)
{
if (strcmp(kPragmaDirectives[ii].name, nameStr) != 0)
@@ -2037,7 +2037,7 @@ static const PreprocessorDirective kInvalidDirective = {
// Look up the directive with the given name.
static PreprocessorDirective const* FindDirective(String const& name)
{
- char const* nameStr = name.Buffer();
+ char const* nameStr = name.getBuffer();
for (int ii = 0; kDirectives[ii].name; ++ii)
{
if (strcmp(kDirectives[ii].name, nameStr) != 0)
@@ -2236,7 +2236,7 @@ static TokenList ReadAllTokens(
{
Token token = ReadToken(preprocessor);
- tokens.mTokens.Add(token);
+ tokens.mTokens.add(token);
// Note: we include the EOF token in the list,
// since that is expected by the `TokenList` type.