mirror of https://gitlab.com/basile.b/dexed.git
hl, token content processed as tokens
This commit is contained in:
parent
8b37ed53d5
commit
257c34b8ec
|
@ -659,43 +659,15 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//token string
|
//token string
|
||||||
if fCurrRange.rangeKinds = [] then if readDelim(reader, fTokStop, 'q{') then
|
if readDelim(reader, fTokStop, 'q{') then
|
||||||
begin
|
begin
|
||||||
fTokKind := tkStrng;
|
fTokKind := tkIdent;
|
||||||
inc(fCurrRange.tokenStringBracketsCount);
|
inc(fCurrRange.tokenStringBracketsCount);
|
||||||
while readUntilAmong(reader, fTokStop, ['{','}']) do
|
|
||||||
begin
|
|
||||||
if reader^ = '{' then inc(fCurrRange.tokenStringBracketsCount) else
|
|
||||||
if reader^ = '}' then dec(fCurrRange.tokenStringBracketsCount);
|
|
||||||
readerNext;
|
|
||||||
if fCurrRange.tokenStringBracketsCount = 0 then
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
fCurrRange.rangeKinds += [rkTokString];
|
fCurrRange.rangeKinds += [rkTokString];
|
||||||
readLine(reader, fTokStop);
|
if (fkBrackets in fFoldKinds) then
|
||||||
if fkStrings in fFoldKinds then
|
|
||||||
StartCodeFoldBlock(nil);
|
StartCodeFoldBlock(nil);
|
||||||
exit;
|
exit;
|
||||||
end else readerReset;
|
end else readerReset;
|
||||||
if rkTokString in fCurrRange.rangeKinds then
|
|
||||||
begin
|
|
||||||
fTokKind := tkStrng;
|
|
||||||
while readUntilAmong(reader, fTokStop, ['{','}']) do
|
|
||||||
begin
|
|
||||||
if reader^ = '{' then inc(fCurrRange.tokenStringBracketsCount) else
|
|
||||||
if reader^ = '}' then dec(fCurrRange.tokenStringBracketsCount);
|
|
||||||
readerNext;
|
|
||||||
if fCurrRange.tokenStringBracketsCount = 0 then
|
|
||||||
begin
|
|
||||||
fCurrRange.rangeKinds -= [rkTokString];
|
|
||||||
if fkStrings in fFoldKinds then
|
|
||||||
EndCodeFoldBlock();
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
readLine(reader, fTokStop);
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// char literals
|
// char literals
|
||||||
if fCurrRange.rangeKinds = [] then if readDelim(reader, fTokStop, #39) then
|
if fCurrRange.rangeKinds = [] then if readDelim(reader, fTokStop, #39) then
|
||||||
|
@ -741,14 +713,26 @@ begin
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// symbChars 1: punctuation
|
// symbols 1
|
||||||
if isSymbol(reader^) then
|
if isSymbol(reader^) then
|
||||||
begin
|
begin
|
||||||
fTokKind := tkSymbl;
|
fTokKind := tkSymbl;
|
||||||
if (fkBrackets in fFoldKinds) then case reader^ of
|
case reader^ of
|
||||||
'{': StartCodeFoldBlock(nil);
|
'{': if (fkBrackets in fFoldKinds) then StartCodeFoldBlock(nil);
|
||||||
'}': begin EndCodeFoldBlock; if (reader^ = '}') and (rkAsm in fCurrRange.rangeKinds) then fCurrRange.rangeKinds -= [rkAsm]; end;
|
'}':
|
||||||
|
begin
|
||||||
|
if (fkBrackets in fFoldKinds) then
|
||||||
|
EndCodeFoldBlock;
|
||||||
|
if (reader^ = '}') and (rkAsm in fCurrRange.rangeKinds) then
|
||||||
|
fCurrRange.rangeKinds -= [rkAsm]; ;
|
||||||
|
if (rkTokString in fCurrRange.rangeKinds) then
|
||||||
|
begin
|
||||||
|
Dec(fCurrRange.tokenStringBracketsCount);
|
||||||
|
if (fCurrRange.tokenStringBracketsCount = 0) then
|
||||||
|
fCurrRange.rangeKinds -= [rkTokString];
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
readerNext;
|
readerNext;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue