Skip to content

Commit

Permalink
#98 Julia: parse apostrophe as char and not adjoint after exclamation.
Browse files Browse the repository at this point in the history
Test apostrophe after exclamation.
  • Loading branch information
getzze authored and nyamatongwe committed Aug 6, 2022
1 parent 84f9a6c commit 31a5815
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/LexillaHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,11 @@ <h3>
<a href="https://github.com/ScintillaOrg/lexilla/pull/98">Pull request #98</a>.
</li>
<li>
Julia: Parse apostrophe as char and not adjoint after exclamation.
<a href="https://github.com/ScintillaOrg/lexilla/issues/97">Issue #97</a>,
<a href="https://github.com/ScintillaOrg/lexilla/pull/98">Pull request #98</a>.
</li>
<li>
Properties: Don't set header flag for empty section.
<a href="https://github.com/ScintillaOrg/lexilla/issues/96">Issue #96</a>.
</li>
Expand Down
1 change: 1 addition & 0 deletions lexers/LexJulia.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ void SCI_METHOD LexerJulia::Lex(Sci_PositionU startPos, Sci_Position length, int
}
} else if (sc.ch == '!') {
sc.SetState(SCE_JULIA_OPERATOR);
transpose = false;
} else if (sc.ch == '\'') {
if (transpose) {
sc.SetState(SCE_JULIA_OPERATOR);
Expand Down
4 changes: 4 additions & 0 deletions test/examples/julia/x.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ end
res = [i for i in 1:10]
=1; ∃=2; ∄=3;

t!'#'
t!='#'
t[]!='#'

#= Dummy function =#
test_fun²(:sym, true, raw"test", `echo 1`)
4 changes: 4 additions & 0 deletions test/examples/julia/x.jl.folded
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
0 400 400 res = [√i for i in 1:10]
0 400 400 ∀=1; ∃=2; ∄=3;
0 400 400
0 400 400 t!'#'
0 400 400 t!='#'
0 400 400 t[]!='#'
0 400 400
0 400 400 #= Dummy function =#
0 400 400 test_fun²(:sym, true, raw"test", `echo 1`)
1 400 400
4 changes: 4 additions & 0 deletions test/examples/julia/x.jl.styled
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ For test only
{9}res{0} {7}={0} {8}[{7}√{9}i{0} {3}for{0} {9}i{0} {3}in{0} {2}1{7}:{2}10{8}]{0}
{9}∀{7}={2}1{7};{0} {9}∃{7}={2}2{7};{0} {9}∄{7}={2}3{7};{0}

{9}t!{7}'{1}#'{0}
{9}t!{7}={6}'#'{0}
{9}t{8}[]{7}!={6}'#'{0}

{1}#= Dummy function =#{0}
{9}test_fun²{8}({11}:sym{7},{0} {5}true{7},{0} {15}raw{10}"test"{7},{0} {16}`echo 1`{8}){0}

0 comments on commit 31a5815

Please sign in to comment.