getID method
Returns the mapped id stored in ids.
If the mapped id is not found in this scope,
then walks up the Scope.parent chain until it
is found. In this way we preserve lexical scoping
and globals. If no id is found, null is returned.
Implementation
String? getID(String id) {
if(ids.containsKey(id)) {
return ids[id]!;
} else {
final String? result = parent?.getID(id);
if(result != null) {
return result;
}
}
return null;
}