add is_dot_or_dotdot inline function