1
###############################################################################
3
# Purpose: Syntax Definitions for Squirrel programming language #
4
# Author: Cody Precord <cprecord@editra.org> #
5
# Copyright: (c) 2008 Cody Precord <staff@editra.org> #
6
# License: wxWindows License #
7
###############################################################################
10
@summary: Lexer configuration module for Squirrel Programming Language
14
__author__ = "Cody Precord <cprecord@editra.org>"
15
__svnid__ = "$Id: _squirrel.py 68798 2011-08-20 17:17:05Z CJP $"
16
__revision__ = "$Revision: 68798 $"
18
#-----------------------------------------------------------------------------#
27
#-----------------------------------------------------------------------------#
29
#---- Keyword Definitions ----#
30
SQUIRREL_KW = (0, "break case catch class clone continue const default "
31
"delegate delete do else enum extends for foreach function "
32
"if in local null resume return switch this throw try typeof "
33
"while parent yield constructor vargc vargv instanceof true "
36
SQUIRREL_TYPES = (1, "")
38
#---- End Keyword Definitions ----#
40
#-----------------------------------------------------------------------------#
42
class SyntaxData(syndata.SyntaxDataBase):
43
"""SyntaxData object for Squirrel"""
44
def __init__(self, langid):
45
super(SyntaxData, self).__init__(langid)
48
self.SetLexer(stc.STC_LEX_CPP)
49
self.RegisterFeature(synglob.FEATURE_AUTOINDENT, _cpp.AutoIndenter)
51
def GetKeywords(self):
52
"""Returns Specified Keywords List """
53
return [SQUIRREL_KW, SQUIRREL_TYPES, _cpp.DOC_KEYWORDS]
55
def GetSyntaxSpec(self):
56
"""Syntax Specifications """
57
return _cpp.SYNTAX_ITEMS
59
def GetProperties(self):
60
"""Returns a list of Extra Properties to set """
63
def GetCommentPattern(self):
64
"""Returns a list of characters used to comment a block of code """