Skip to content

Commit

Permalink
add colon ops (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacLN authored and KristofferC committed Jul 16, 2019
1 parent 4a93413 commit 5949c8d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 13 additions & 1 deletion src/token_kinds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,12 @@
begin_colon,
COLON, # :
DDOT, # ..
LDOTS, #
TRICOLON, #
VDOTS, #
DDOTS, #
ADOTS, #
CDOTS, #
end_colon,

# Level 9
Expand Down Expand Up @@ -1317,7 +1323,13 @@ const UNICODE_OPS = Dict{Char, Kind}(
'' => DOWNWARDS_HARPOON_WITH_BARB_LEFT_BESIDE_UPWARDS_HARPOON_WITH_BARB_RIGHT,
'' => HALFWIDTH_UPWARDS_ARROW,
'' => HALFWIDTH_DOWNWARDS_ARROW,
'' => UNICODE_DOT)
'' => UNICODE_DOT,
'' => LDOTS,
'' => TRICOLON,
'' => VDOTS,
'' => DDOTS,
'' => ADOTS,
'' => CDOTS)


const UNICODE_OPS_REVERSE = Dict{Kind,Symbol}()
Expand Down
6 changes: 3 additions & 3 deletions src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ function is_cat_id_start(ch::Char, cat::Integer)
((c >= 0x2140 && c <= 0x2144) || # ⅀, ⅁, ⅂, ⅃, ⅄
c == 0x223f || c == 0x22be || c == 0x22bf || # ∿, ⊾, ⊿
c == 0x22a4 || c == 0x22a5 || # ⊤ ⊥
(c >= 0x22ee && c <= 0x22f1) || # ⋮, ⋯, ⋰, ⋱

(c >= 0x2202 && c <= 0x2233 &&
(c == 0x2202 || c == 0x2205 || c == 0x2206 || # ∂, ∅, ∆
Expand Down Expand Up @@ -212,6 +211,8 @@ takechar(io::IO) = (readchar(io); io)
c == 0x000000ac ||
c == 0x000000b1 ||
c == 0x000000d7 ||
c == 0x00002026 ||
c == 0x0000205d ||
c == 0x0000214b ||
0x00002190 <= c <= 0x00002194 ||
0x0000219a <= c <= 0x0000219b ||
Expand Down Expand Up @@ -241,8 +242,7 @@ takechar(io::IO) = (readchar(io); io)
0x000022bc <= c <= 0x000022bd ||
0x000022c4 <= c <= 0x000022c7 ||
0x000022c9 <= c <= 0x000022d3 ||
0x000022d5 <= c <= 0x000022ed ||
0x000022f2 <= c <= 0x000022ff ||
0x000022d5 <= c <= 0x000022ff ||
c == 0x000025b7 ||
c == 0x000027c2 ||
0x000027c8 <= c <= 0x000027c9 ||
Expand Down

0 comments on commit 5949c8d

Please sign in to comment.