~ubuntu-branches/debian/experimental/geany/experimental

« back to all changes in this revision

Viewing changes to scintilla/include/KeyWords.h

  • Committer: Bazaar Package Importer
  • Author(s): Damián Viano
  • Date: 2008-05-02 11:37:45 UTC
  • mfrom: (1.2.1 upstream) (3.1.6 hardy)
  • Revision ID: james.westby@ubuntu.com-20080502113745-xzp4g6dmovrpoj17
Tags: 0.14-1
New upstream release (Closes: #478126)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Scintilla source code edit control
 
1
/* Scintilla source code edit control */
2
2
/** @file KeyWords.h
3
3
 ** Colourise for particular languages.
4
4
 **/
5
 
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6
 
// The License.txt file describes the conditions under which this software may be distributed.
 
5
/* Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
 
6
 * The License.txt file describes the conditions under which this software may be distributed. */
 
7
 
 
8
#ifdef SCI_NAMESPACE
 
9
namespace Scintilla {
 
10
#endif
7
11
 
8
12
typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
9
13
                  WordList *keywordlists[], Accessor &styler);
10
 
                  
 
14
 
11
15
/**
12
16
 * A LexerModule is responsible for lexing and folding a particular language.
13
17
 * The class maintains a list of LexerModules which can be searched to find a
27
31
 
28
32
public:
29
33
        const char *languageName;
30
 
        LexerModule(int language_, 
31
 
                LexerFunction fnLexer_, 
32
 
                const char *languageName_=0, 
 
34
        LexerModule(int language_,
 
35
                LexerFunction fnLexer_,
 
36
                const char *languageName_=0,
33
37
                LexerFunction fnFolder_=0,
34
38
                const char * const wordListDescriptions_[] = NULL,
35
39
                int styleBits_=5);
37
41
        }
38
42
        int GetLanguage() const { return language; }
39
43
 
40
 
        // -1 is returned if no WordList information is available
 
44
        /* -1 is returned if no WordList information is available */
41
45
        int GetNumWordLists() const;
42
46
        const char *GetWordListDescription(int index) const;
43
47
 
51
55
        static const LexerModule *Find(const char *languageName);
52
56
};
53
57
 
 
58
#ifdef SCI_NAMESPACE
 
59
}
 
60
#endif
 
61
 
54
62
/**
55
63
 * Check if a character is a space.
56
64
 * This is ASCII specific but is safe with chars >= 0x80.
70
78
inline bool isoperator(char ch) {
71
79
        if (isascii(ch) && isalnum(ch))
72
80
                return false;
73
 
        // '.' left out as it is used to make up numbers
 
81
        /* '.' left out as it is used to make up numbers */
74
82
        if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
75
83
                ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
76
84
                ch == '=' || ch == '|' || ch == '{' || ch == '}' ||