MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / matchTwoCharOp

Function matchTwoCharOp

src/script_tokenizer.cpp:149–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149TokenType matchTwoCharOp(char c, char next)
150{
151 if(c == '.' && next == '.')
152 return TokenType::DotDot;
153 if(c == '&' && next == '&')
154 return TokenType::AmpAmp;
155 if(c == '|' && next == '|')
156 return TokenType::PipePipe;
157 if(c == '=' && next == '=')
158 return TokenType::EqualEqual;
159 if(c == '!' && next == '=')
160 return TokenType::BangEqual;
161 if(c == '<' && next == '=')
162 return TokenType::LessEqual;
163 if(c == '>' && next == '=')
164 return TokenType::GreaterEqual;
165 if(c == ':' && next == '=')
166 return TokenType::ColonEqual;
167 if(c == '+' && next == '=')
168 return TokenType::PlusEqual;
169 if(c == '-' && next == '=')
170 return TokenType::MinusEqual;
171 if(c == '*' && next == '=')
172 return TokenType::StarEqual;
173 if(c == '/' && next == '=')
174 return TokenType::SlashEqual;
175 return TokenType::Error;
176}
177
178TokenType matchSingleCharOp(char c)
179{

Callers 1

tokenizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected