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

Function ParseAtomicExpression

tools/test.py:1192–1218  ·  view source on GitHub ↗
(scan)

Source from the content-addressed store, hash-verified

1190
1191
1192def ParseAtomicExpression(scan):
1193 if scan.Current() == "true":
1194 scan.Advance()
1195 return Constant(True)
1196 elif scan.Current() == "false":
1197 scan.Advance()
1198 return Constant(False)
1199 elif IsAlpha(scan.Current()):
1200 name = scan.Current()
1201 scan.Advance()
1202 return Outcome(name.lower())
1203 elif scan.Current() == '$':
1204 scan.Advance()
1205 if not IsAlpha(scan.Current()):
1206 return None
1207 name = scan.Current()
1208 scan.Advance()
1209 return Variable(name.lower())
1210 elif scan.Current() == '(':
1211 scan.Advance()
1212 result = ParseLogicalExpression(scan)
1213 if (not result) or (scan.Current() != ')'):
1214 return None
1215 scan.Advance()
1216 return result
1217 else:
1218 return None
1219
1220
1221BINARIES = ['==', '!=']

Callers 1

ParseOperatorExpressionFunction · 0.85

Calls 7

IsAlphaFunction · 0.85
OutcomeClass · 0.85
ParseLogicalExpressionFunction · 0.85
ConstantClass · 0.70
VariableClass · 0.70
CurrentMethod · 0.45
AdvanceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…