dplassgit / d2lang

D2 is a strongly-typed, statically-typed, (mostly) inferred-type compiled language.
MIT License
6 stars 0 forks source link

Clean up SymbolTable API #355

Closed dplassgit closed 3 weeks ago

dplassgit commented 3 weeks ago

Remove lookup and get (replace with lookupRecursive and getRecursive, or equivalent).

Iintroduce <T> T getByType(name, Class<T> clazz) so we can write

   RecordSymbol rs = getByType("r", RecordSymbol.class);

instead of

   RecordSymbol rs = (RecordSymbol) get("r");