add support for variable expansions

This does not add actual expansions but simply makes them parseable.