MCPcopy Create free account
hub / github.com/geekcomputers/Python / registerLabels

Function registerLabels

Assembler/assembler.py:1276–1284  ·  view source on GitHub ↗

This function search for labels / subprogram-labels and registers this in the 'jumps' list.

()

Source from the content-addressed store, hash-verified

1274
1275
1276def registerLabels():
1277 """
1278 This function search for labels / subprogram-labels and registers this in the 'jumps' list.
1279 """
1280 for i in range(len(tokens)):
1281 if tokens[i].t == "label":
1282 jumps[tokens[i].token] = i
1283 elif tokens[i].t == "subprogram":
1284 jumps[tokens[i].token] = i
1285
1286
1287def resetInterpreter():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected