From 21c143fc259b3a340f368e36ce7f478b6cb9ec2f Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 13 Sep 2020 00:18:38 +0200 Subject: [PATCH] gdb commander, fix getting expression within square brackets --- CHANGELOG.md | 6 ++++++ src/u_dlang.pas | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f419393a..30f6b42e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v3.9.8-dev + +## Enhancements + +- Project inspector: moved the list of configuration to a combo box over the file tree. + # v3.9.7 ## Enhancements diff --git a/src/u_dlang.pas b/src/u_dlang.pas index bf0f6869..6891d1c7 100644 --- a/src/u_dlang.pas +++ b/src/u_dlang.pas @@ -1153,6 +1153,7 @@ var ri: integer; li: integer = -1; p : integer = 1; + s : integer = 1; i : integer; t : PLexToken; begin @@ -1189,6 +1190,14 @@ begin li := i+1; break; end; + s += Byte((t^.kind = TLexTokenKind.ltkSymbol) and (t^.Data = ']')); + s -= Byte((t^.kind = TLexTokenKind.ltkSymbol) and (t^.Data = '[')); + // [a.[b].c| -> a.[b].c + if s.equals(0) then + begin + li := i+1; + break; + end; end; if not li.equals(-1) and (ri >= li) then begin