#NEWLINE# def get_color( self , raw_line ) : #NEWLINE# #INDENT# color = color_map [ 'white' ] #NEWLINE# line = raw_line . strip ( ) #NEWLINE# keywords = [ 'if' , 'else' , 'finally' , 'try' , 'catch' , 'foreach' , 'while' , 'continue' , 'pass' , 'break' ] #NEWLINE# if helpers . starts ( self , [ 'include' , 'require' ] ) : #NEWLINE# #INDENT# color = color_map [ 'blue' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if helpers . starts ( line , [ 'class' , 'public' , 'private' , 'function' ] ) : #NEWLINE# #INDENT# color = color_map [ 'green' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if helpers . starts ( line , 'def' ) : #NEWLINE# #INDENT# color = color_map [ 'cyan' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if helpers . starts ( line , [ 'return' ] ) : #NEWLINE# #INDENT# color = color_map [ 'red' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if helpers . starts ( line , '$' ) : #NEWLINE# #INDENT# color = color_map [ 'cyan' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if helpers . starts ( line , [ '#' , '//' , '/*' , '*/' ] ) : #NEWLINE# #INDENT# color = color_map [ 'magenta' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if helpers . starts ( line , keywords ) : #NEWLINE# #INDENT# color = color_map [ 'yellow' ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return color