MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / trim_asm_const_body

Function trim_asm_const_body

tools/emscripten.py:286–297  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

284
285
286def trim_asm_const_body(body):
287 body = body.strip()
288 orig = None
289 while orig != body:
290 orig = body
291 if len(body) > 1 and body[0] == '"' and body[-1] == '"':
292 body = body[1:-1].replace('\\"', '"').strip()
293 if len(body) > 1 and body[0] == '{' and body[-1] == '}' and parentheses_match(body, 0, -1):
294 body = body[1:-1].strip()
295 if len(body) > 1 and body[0] == '(' and body[-1] == ')' and parentheses_match(body, 0, -1):
296 body = body[1:-1].strip()
297 return body
298
299
300def get_cached_file(filetype, filename, generator, cache_limit):

Callers 1

create_asm_constsFunction · 0.85

Calls 1

parentheses_matchFunction · 0.85

Tested by

no test coverage detected