MCPcopy Create free account
hub / github.com/codecombat/codecombat / ConvertBooleanLiteral

Method ConvertBooleanLiteral

app/lib/code-to-blocks.js:120–126  ·  view source on GitHub ↗
(n, ctx)

Source from the content-addressed store, hash-verified

118 }
119
120 static ConvertBooleanLiteral (n, ctx) {
121 const found = findOne(ctx.plan, x => fuzzyMatch(n, x[1]), 'Finding Boolean Literal')
122 return {
123 type: found[0].type,
124 fields: { BOOL: n.value ? 'TRUE' : 'FALSE' },
125 }
126 }
127
128 static ConvertBlockStatement (n, ctx) {
129 return convert(n.body, { ...ctx, context: 'statement' })

Callers 1

ConvertLiteralMethod · 0.80

Calls 2

findOneFunction · 0.85
fuzzyMatchFunction · 0.85

Tested by

no test coverage detected