MCPcopy Create free account
hub / github.com/nodejs/node / BuildBinaryOperation

Method BuildBinaryOperation

deps/v8/tools/cppgc/gen_cmake.py:374–387  ·  view source on GitHub ↗
(self, left, op, right)

Source from the content-addressed store, hash-verified

372 return ' '.join([OPS[op], right])
373
374 def BuildBinaryOperation(self, left, op, right):
375 if op == 'ne':
376 neg_result = self.BuildBinaryOperation(left, 'eq', right)
377 return self.BuildUnaryOperation('neg', neg_result)
378 OPS = {
379 'eq': 'STREQUAL',
380 'le': 'LESS_EQUAL',
381 'lt': 'LESS',
382 'ge': 'GREATER_EQUAL',
383 'gt': 'GREATER',
384 'and': 'AND',
385 'or': 'OR',
386 }
387 return ' '.join([left, OPS[op], right])
388
389 def BuildIdentifier(self, token):
390 return self._CMakeVarRef(token)

Callers 1

_BinaryExprMethod · 0.80

Calls 2

BuildUnaryOperationMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected