MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / isSingleCharOperator

Method isSingleCharOperator

src/Lexer.cpp:153–167  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

151
152////////////////////////////////////////////////////////////////////////////////
153bool Lexer::isSingleCharOperator(int c) {
154 return c == '+' || // Addition
155 c == '-' || // Subtraction or unary minus = ambiguous
156 c == '*' || // Multiplication
157 c == '/' || // Diviѕion
158 c == '(' || // Precedence open parenthesis
159 c == ')' || // Precedence close parenthesis
160 c == '<' || // Less than
161 c == '>' || // Greater than
162 c == '^' || // Exponent
163 c == '!' || // Unary not
164 c == '%' || // Modulus
165 c == '=' || // Partial match
166 c == '~'; // Pattern match
167}
168
169////////////////////////////////////////////////////////////////////////////////
170bool Lexer::isDoubleCharOperator(int c0, int c1, int c2) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected