MCPcopy Index your code
hub / github.com/nodejs/node / ParseCondition

Function ParseCondition

tools/test.py:1261–1275  ·  view source on GitHub ↗

Parses a logical expression into an Expression object

(expr)

Source from the content-addressed store, hash-verified

1259
1260
1261def ParseCondition(expr):
1262 """Parses a logical expression into an Expression object"""
1263 tokens = Tokenizer(expr).Tokenize()
1264 if not tokens:
1265 print("Malformed expression: '%s'" % expr)
1266 return None
1267 scan = Scanner(tokens)
1268 ast = ParseLogicalExpression(scan)
1269 if not ast:
1270 print("Malformed expression: '%s'" % expr)
1271 return None
1272 if scan.HasMore():
1273 print("Malformed expression: '%s'" % expr)
1274 return None
1275 return ast
1276
1277
1278class Configuration(object):

Callers 1

ReadConfigurationIntoFunction · 0.85

Calls 6

HasMoreMethod · 0.95
ScannerClass · 0.85
ParseLogicalExpressionFunction · 0.85
TokenizeMethod · 0.80
TokenizerClass · 0.70
printFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…