add support for var.foo and local.foo syntax