]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/lexlib/StyleContext.cxx
1 // Scintilla source code edit control
2 /** @file StyleContext.cxx
3 ** Lexer infrastructure.
5 // Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>
6 // This file is in the public domain.
16 #include "LexAccessor.h"
18 #include "StyleContext.h"
21 using namespace Scintilla
;
24 static void getRange(unsigned int start
,
30 while ((i
< end
- start
+ 1) && (i
< len
-1)) {
31 s
[i
] = styler
[start
+ i
];
37 void StyleContext::GetCurrent(char *s
, unsigned int len
) {
38 getRange(styler
.GetStartSegment(), currentPos
- 1, styler
, s
, len
);
41 static void getRangeLowered(unsigned int start
,
47 while ((i
< end
- start
+ 1) && (i
< len
-1)) {
48 s
[i
] = static_cast<char>(tolower(styler
[start
+ i
]));
54 void StyleContext::GetCurrentLowered(char *s
, unsigned int len
) {
55 getRangeLowered(styler
.GetStartSegment(), currentPos
- 1, styler
, s
, len
);