aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexPS.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexers/LexPS.cxx')
-rw-r--r--lexers/LexPS.cxx28
1 files changed, 6 insertions, 22 deletions
diff --git a/lexers/LexPS.cxx b/lexers/LexPS.cxx
index ae2635368..2c8917dae 100644
--- a/lexers/LexPS.cxx
+++ b/lexers/LexPS.cxx
@@ -6,6 +6,12 @@
** The License.txt file describes the conditions under which this software may be distributed.
**/
+// Previous releases of this lexer included support for marking token starts with
+// a style byte indicator. This was used by the wxGhostscript IDE/debugger.
+// Style byte indicators were removed in version 3.4.3.
+// Anyone wanting to restore this functionality for wxGhostscript using 'modern'
+// indicators can examine the earlier source in the Mercurial repository.
+
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -72,7 +78,6 @@ static void ColourisePSDoc(
StyleContext sc(startPos, length, initStyle, styler);
- bool tokenizing = styler.GetPropertyInt("ps.tokenize") != 0;
int pslevel = styler.GetPropertyInt("ps.level", 3);
int lineCurrent = styler.GetLine(startPos);
int nestTextCurrent = 0;
@@ -83,15 +88,6 @@ static void ColourisePSDoc(
bool numHasExponent = false;
bool numHasSign = false;
- // Clear out existing tokenization
- if (tokenizing && length > 0) {
- styler.StartAt(startPos, static_cast<char>(INDIC2_MASK));
- styler.ColourTo(startPos + length-1, 0);
- styler.Flush();
- styler.StartAt(startPos);
- styler.StartSegment(startPos);
- }
-
for (; sc.More(); sc.Forward()) {
if (sc.atLineStart)
lineCurrent = styler.GetLine(sc.currentPos);
@@ -196,7 +192,6 @@ static void ColourisePSDoc(
// Determine if a new state should be entered.
if (sc.state == SCE_C_DEFAULT) {
- unsigned int tokenpos = sc.currentPos;
if (sc.ch == '[' || sc.ch == ']') {
sc.SetState(SCE_PS_PAREN_ARRAY);
@@ -262,17 +257,6 @@ static void ColourisePSDoc(
} else if (!IsAWhitespaceChar(sc.ch)) {
sc.SetState(SCE_PS_NAME);
}
-
- // Mark the start of tokens
- if (tokenizing && sc.state != SCE_C_DEFAULT && sc.state != SCE_PS_COMMENT &&
- sc.state != SCE_PS_DSC_COMMENT && sc.state != SCE_PS_DSC_VALUE) {
- styler.Flush();
- styler.StartAt(tokenpos, static_cast<char>(INDIC2_MASK));
- styler.ColourTo(tokenpos, INDIC2_MASK);
- styler.Flush();
- styler.StartAt(tokenpos);
- styler.StartSegment(tokenpos);
- }
}
if (sc.atLineEnd)