$foo
        $foo.bar
        $foo.bar()
        $foo[0]
        $foo.bar(10)

def varvalu(self, varn=None):
        '''
        $foo
        $foo.bar
        $foo.bar()
        $foo[0]
        $foo.bar(10)
        '''

        self.ignore(whitespace)

        if varn is None:
            varn = self.varname()

        varv = s_ast.VarValue(kids=[varn])

        # handle derefs and calls...
        while self.more():

            if self.nextstr('.'):
                varv = self.varderef(varv)
                continue

            if self.nextstr('('):
                varv = self.varcall(varv)
                continue

            #if self.nextstr('['):
                #varv = self.varslice(varv)

            break

        return varv