Skip to content

Commit

Permalink
Merge pull request #102 from kdbinsidebrains/101-is-there-a-way-to-di…
Browse files Browse the repository at this point in the history
…sable-syntax-highlighting-for-mode-such-as-x

5.8.3: Mode parsing fixed
  • Loading branch information
smklimenko authored Jul 28, 2024
2 parents fc94aa8 + 567c1c0 commit 22a1502
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# KdbInsideBrains Changelog

## [5.8.3]

### Fixed

- Issues 101: mode highlighting is used for a variable at the end of line sometimes

## [5.8.2]

### Fixed
Expand Down
7 changes: 3 additions & 4 deletions src/main/resources/org/kdb/inside/brains/q.flex
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ package org.kdb.inside.brains;

import com.intellij.psi.tree.IElementType;

import java.util.Deque;
import java.util.ArrayDeque;

import static org.kdb.inside.brains.psi.QTypes.*;
import java.util.Deque;

import static com.intellij.psi.TokenType.BAD_CHARACTER;
import static com.intellij.psi.TokenType.WHITE_SPACE;
import static org.kdb.inside.brains.psi.QTypes.*;

%%

Expand Down Expand Up @@ -318,7 +317,7 @@ Vector={BooleanList}|{ByteList}|{IntegerList}|{FloatList}|
^{CommandName}/{NewLine} { return COMMAND_SYSTEM; }
^{CommandName}/{WhiteSpace} { return COMMAND_SYSTEM; }

^{ModePrefix} { return MODE_PATTERN; }
^{ModePrefix} { if (zzCurrentPos == 0 || zzBuffer.charAt(zzCurrentPos - 1) == '\n') {return MODE_PATTERN; } else {yypushback(1); return VARIABLE_PATTERN;} }

{TypeCast} { return TYPE_CAST_PATTERN; }

Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pluginVersion=5.8.2
pluginVersion=5.8.3

0 comments on commit 22a1502

Please sign in to comment.