From 27a22f2c85e3aa0f540c61a0a245a0d759e706a9 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 13 Jul 2010 21:19:35 +1000 Subject: Creating lexlib with lexer support files. --- src/StyleContext.cxx | 55 ---------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/StyleContext.cxx (limited to 'src/StyleContext.cxx') diff --git a/src/StyleContext.cxx b/src/StyleContext.cxx deleted file mode 100644 index 4a1f71622..000000000 --- a/src/StyleContext.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Scintilla source code edit control -/** @file StyleContext.cxx - ** Lexer infrastructure. - **/ -// Copyright 1998-2004 by Neil Hodgson -// This file is in the public domain. - -#include -#include -#include -#include - -#include "Platform.h" - -#include "PropSet.h" -#include "Accessor.h" -#include "StyleContext.h" - -#ifdef SCI_NAMESPACE -using namespace Scintilla; -#endif - -static void getRange(unsigned int start, - unsigned int end, - Accessor &styler, - char *s, - unsigned int len) { - unsigned int i = 0; - while ((i < end - start + 1) && (i < len-1)) { - s[i] = styler[start + i]; - i++; - } - s[i] = '\0'; -} - -void StyleContext::GetCurrent(char *s, unsigned int len) { - getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); -} - -static void getRangeLowered(unsigned int start, - unsigned int end, - Accessor &styler, - char *s, - unsigned int len) { - unsigned int i = 0; - while ((i < end - start + 1) && (i < len-1)) { - s[i] = static_cast(tolower(styler[start + i])); - i++; - } - s[i] = '\0'; -} - -void StyleContext::GetCurrentLowered(char *s, unsigned int len) { - getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); -} -- cgit v1.2.3