Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JuliaSyntax"
uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4"
authors = ["Chris Foster <chris42f@gmail.com> and contributors"]
version = "0.3.4"
version = "0.3.5"

[compat]
julia = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions src/expr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function is_stringchunk(node)
return k == K"String" || k == K"CmdString"
end

function reorder_parameters!(args, params_pos)
function reorder_parameters!(args::Vector{Any}, params_pos)
p = 0
for i = length(args):-1:1
if !Meta.isexpr(args[i], :parameters)
Expand All @@ -24,7 +24,7 @@ function reorder_parameters!(args, params_pos)
end
# nest frankentuples parameters sections
for i = length(args)-1:-1:p
pushfirst!(args[i].args, pop!(args))
pushfirst!((args[i]::Expr).args, pop!(args))
end
# Move parameters to args[params_pos]
insert!(args, params_pos, pop!(args))
Expand Down
2 changes: 1 addition & 1 deletion src/kinds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ function untokenize(k::Kind; unique=true)
end

# Error kind => description
_token_error_descriptions = Dict{Kind, String}(
const _token_error_descriptions = Dict{Kind, String}(
K"ErrorEofMultiComment" => "unterminated multi-line comment #= ... =#",
K"ErrorInvalidNumericConstant" => "invalid numeric constant",
K"ErrorHexFloatMustContainP" => "hex float literal must contain `p` or `P`",
Expand Down
2 changes: 1 addition & 1 deletion src/parse_stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ example
TODO: Are these the only cases? Can we replace this general utility with a
simpler one which only splits preceding dots?
"""
function bump_split(stream::ParseStream, split_spec...)
function bump_split(stream::ParseStream, split_spec::Vararg{Any, N}) where {N}
tok = stream.lookahead[stream.lookahead_index]
stream.lookahead_index += 1
b = _next_byte(stream)
Expand Down