#NEWLINE# def assertToken( self , tok , expected ) : #NEWLINE# #INDENT# if isinstance ( expected , list ) : #NEWLINE# #INDENT# if ( tok not in expected ) : #NEWLINE# #INDENT# raise UnexpectedTokenException ( tok . _currentIndex , tok , expected ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( tok != expected ) : #NEWLINE# #INDENT# raise UnexpectedTokenException ( self . _currentIndex , tok , expected )