MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ConvertWordOperator

Method ConvertWordOperator

source/script.cpp:5671–5699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5669
5670
5671SymbolType Script::ConvertWordOperator(LPCTSTR aWord, size_t aLength)
5672{
5673 struct WordOp
5674 {
5675 LPCTSTR word;
5676 SymbolType op;
5677 };
5678 static WordOp sWordOp[] =
5679 {
5680 { _T("or"), SYM_OR },
5681 { _T("and"), SYM_AND },
5682 { _T("not"), SYM_LOWNOT },
5683 { _T("is"), SYM_IS },
5684 { _T("IsSet"), SYM_ISSET },
5685 { SUPER_KEYWORD, SYM_SUPER },
5686 { _T("as"), SYM_RESERVED_OPERATOR },
5687 { _T("contains"), SYM_RESERVED_OPERATOR },
5688 { _T("in"), SYM_RESERVED_OPERATOR },
5689 { _T("unset"), SYM_RESERVED_WORD },
5690 };
5691 for (int i = 0; i < _countof(sWordOp); ++i)
5692 {
5693 if (!_tcsnicmp(sWordOp[i].word, aWord, aLength) && !sWordOp[i].word[aLength])
5694 {
5695 return sWordOp[i].op;
5696 }
5697 }
5698 return (SymbolType)FALSE;
5699}
5700
5701
5702ResultType Script::ParseFatArrow(LPTSTR aArgText, LPTSTR aArgMap, DerefList &aDeref

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected