SymbolTable<T> constructor

SymbolTable<T>({
  1. Map<String, T> values = const {},
})

Initializes an empty symbol table.

You can optionally provide a Map of starter values.

Implementation

SymbolTable({Map<String, T> values = const {}}) {
  if (values.isNotEmpty == true) {
    values.forEach((k, v) {
      _variables.add(Variable<T>._(k, this, value: v));
    });
  }
}