############################################################################### # Name: pike.py # # Purpose: Define highlighting/syntax for Pike programming language # # Author: Cody Precord # # Copyright: (c) 2007 Cody Precord # # License: wxWindows License # ############################################################################### """ FILE: pike.py @summary: Defines syntax and highlighting settings for the Pike programming language. Pike is very similar in form to C/CPP so the Cpp lexer is used to provide the highlighting settings. """ __author__ = "Cody Precord " __svnid__ = "$Id: _pike.py 68798 2011-08-20 17:17:05Z CJP $" __revision__ = "$Revision: 68798 $" #-----------------------------------------------------------------------------# # Imports import wx.stc as stc # Local Imports import synglob import syndata import _cpp #-----------------------------------------------------------------------------# #---- Keyword Definitions ----# PIKE_KW = (0, "goto break return continue case default if else switch while " "foreach do gauge destruct lambda inherit import typeof catch " "for inline nomask") PIKE_TYPE = (1, "private protected public static " "int string void float mapping array multiset mixed program " "object function") #---- End Keyword Definitions ----# #-----------------------------------------------------------------------------# class SyntaxData(_cpp.SyntaxData): """SyntaxData object for Pike""" def __init__(self, langid): super(SyntaxData, self).__init__(langid) def GetKeywords(self): """Returns Specified Keywords List """ return [PIKE_KW, PIKE_TYPE, _cpp.DOC_KEYWORDS] def GetCommentPattern(self): """Get the comment pattern""" return [u"//"]