WaSH Docs
Functions | Variables
ws2st::refactor::variables Namespace Reference

Functions

void HandleRegisterVariable (const MatchFinder::MatchResult &Result, Replacements &Replace)
 
std::string getVariableDeclarationSource ()
 
std::string getVariableDefinitionSource ()
 
void HandleInsertVariablesDeclaration (const MatchFinder::MatchResult &Result, Replacements &Replace)
 
void HandleSetVariable (const MatchFinder::MatchResult &Result, Replacements &Replace)
 
void HandleGetVariable (const MatchFinder::MatchResult &Result, Replacements &Replace)
 
void HandleGetVariableRef (const MatchFinder::MatchResult &Result, Replacements &Replace)
 

Variables

StatementMatcher RegisterVariableMatcher
 
StatementMatcher RegisterVariableNoInitMatcher
 
DeclarationMatcher InsertVariablesDeclarationMatcher
 
StatementMatcher SetVariableMatcher
 
StatementMatcher GetVariableMatcher
 
StatementMatcher GetVariableRefMatcher
 

Function Documentation

◆ getVariableDeclarationSource()

std::string ws2st::refactor::variables::getVariableDeclarationSource ( )

◆ getVariableDefinitionSource()

std::string ws2st::refactor::variables::getVariableDefinitionSource ( )

◆ HandleGetVariable()

void ws2st::refactor::variables::HandleGetVariable ( const MatchFinder::MatchResult &  Result,
Replacements &  Replace 
)

◆ HandleGetVariableRef()

void ws2st::refactor::variables::HandleGetVariableRef ( const MatchFinder::MatchResult &  Result,
Replacements &  Replace 
)

◆ HandleInsertVariablesDeclaration()

void ws2st::refactor::variables::HandleInsertVariablesDeclaration ( const MatchFinder::MatchResult &  Result,
Replacements &  Replace 
)

◆ HandleRegisterVariable()

void ws2st::refactor::variables::HandleRegisterVariable ( const MatchFinder::MatchResult &  Result,
Replacements &  Replace 
)

◆ HandleSetVariable()

void ws2st::refactor::variables::HandleSetVariable ( const MatchFinder::MatchResult &  Result,
Replacements &  Replace 
)

Variable Documentation

◆ GetVariableMatcher

StatementMatcher ws2st::refactor::variables::GetVariableMatcher

◆ GetVariableRefMatcher

StatementMatcher ws2st::refactor::variables::GetVariableRefMatcher

◆ InsertVariablesDeclarationMatcher

DeclarationMatcher ws2st::refactor::variables::InsertVariablesDeclarationMatcher
Initial value:
= traverse(TK_IgnoreUnlessSpelledInSource,
cxxRecordDecl(hasName("_variables_defs")).bind("decl")
)

◆ RegisterVariableMatcher

StatementMatcher ws2st::refactor::variables::RegisterVariableMatcher
Initial value:
= traverse(TK_IgnoreUnlessSpelledInSource, callExpr(
hasDescendant(
declRefExpr(
to(functionDecl(
hasName("wash::add_variable")
))
)
),
hasArgument(0, ignoringImplicit( stringLiteral().bind("variableName") )),
hasArgument(1, ignoringImplicit( expr().bind("initValue") ))
).bind("call"))

◆ RegisterVariableNoInitMatcher

StatementMatcher ws2st::refactor::variables::RegisterVariableNoInitMatcher
Initial value:
= traverse(TK_IgnoreUnlessSpelledInSource, callExpr(
hasDescendant(
declRefExpr(
to(functionDecl(
hasName("wash::add_variable")
))
)
),
hasArgument(0, ignoringImplicit( stringLiteral().bind("variableName") )),
argumentCountIs(1)
).bind("call"))

◆ SetVariableMatcher

StatementMatcher ws2st::refactor::variables::SetVariableMatcher