optimize variable_info

we now don't  check for '.', '[', ']' twice.
add newline at end of file
add variable_access test case