mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
added compiler extensions class
This commit is contained in:
parent
474b412b47
commit
a1beffc3cd
5 changed files with 80 additions and 5 deletions
18
components/compiler/extensions.cpp
Normal file
18
components/compiler/extensions.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
#include "extensions.hpp"
|
||||
|
||||
namespace Compiler
|
||||
{
|
||||
|
||||
Extensions::Extensions() : mNextKeywordIndex (-1) {}
|
||||
|
||||
int Extensions::searchKeyword (const std::string& keyword) const
|
||||
{
|
||||
std::map<std::string, int>::const_iterator iter = mKeywords.find (keyword);
|
||||
|
||||
if (iter==mKeywords.end())
|
||||
return 0;
|
||||
|
||||
return iter->second;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue