Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
femtocleaner[bot] committed Jun 25, 2018
1 parent 2f9ce23 commit c953d0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ render(tpl, {"a" => d}) | print
The variable lookup happens within the specified view. The default view is `Main`. One can specify a Dict or a CompositeType as well. For iterable objects, an array can be used.

```julia
type ThrowAway
mutable struct ThrowAway
x
y
end
Expand Down
16 changes: 8 additions & 8 deletions src/tokens.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ function make_tokens(template, tags)

scanner = Scanner(template)

sections = @compat Array{Any}(undef,0)
tokens = @compat Array{Any}(undef, 0)
spaces = @compat Array{Integer}(undef, 0)
sections = Array{Any}(undef,0)
tokens = Array{Any}(undef, 0)
spaces = Array{Integer}(undef, 0)
hasTag = false
nonSpace = false

Expand All @@ -32,7 +32,7 @@ function make_tokens(template, tags)
delete!(tokens, pop!(spaces))
end
else
spaces = @compat Array{Integer}(undef,0)
spaces = Array{Integer}(undef,0)
end

hasTag = false
Expand Down Expand Up @@ -138,7 +138,7 @@ end

## take single character tokens and collaps into chunks
function squashTokens(tokens)
squashedTokens = @compat Array{Any}(undef, 0)
squashedTokens = Array{Any}(undef, 0)
lastToken = nothing

for i in 1:length(tokens)
Expand All @@ -162,9 +162,9 @@ end
## all tokens that appear in that section and 2) the index in the original
## template that represents the end of that section.
function nestTokens(tokens)
tree = @compat Array{Any}(undef, 0)
tree = Array{Any}(undef, 0)
collector = tree
sections = @compat Array{Any}(undef, 0)
sections = Array{Any}(undef, 0)

for i in 1:length(tokens)
token = tokens[i]
Expand All @@ -174,7 +174,7 @@ function nestTokens(tokens)
if token[1] == "^" || token[1] == "#"
push!(sections, token)
push!(collector, token)
push!(token, @compat Array{Any}(undef, 0))
push!(token, Array{Any}(undef, 0))
collector = token[5]
elseif token[1] == "/"
section = pop!(sections)
Expand Down

0 comments on commit c953d0f

Please sign in to comment.