Showing 3 of 4 files from the diff.

@@ -357,7 +357,7 @@
Loading
357 357
"""
358 358
Helper function for parsing import/using statements.
359 359
"""
360 -
function parse_dot_mod(ps::ParseState, is_colon = false)
360 +
function parse_dot_mod(ps::ParseState, is_colon = false, allow_as = false)
361 361
    ret = EXPR(EXPR(:OPERATOR, 0, 0, "."), EXPR[], EXPR[])
362 362
363 363
    prevpos = position(ps)
@@ -387,6 +387,13 @@
Loading
387 387
            pushtotrivia!(ret, EXPR(:DOT, 1, 1))
388 388
            ps.nt = RawToken(kindof(ps.nt), ps.nt.startpos, ps.nt.endpos, ps.nt.startbyte + 1, ps.nt.endbyte, ps.nt.token_error, false, ps.nt.suffix)
389 389
        else
390 +
            @static if VERSION > v"1.6-"
391 +
                if allow_as && !isnewlinews(ps.ws) && isidentifier(ps.nt) && val(ps.nt, ps) == "as"
392 +
                    as = EXPR(:AS, next(ps))
393 +
                    as_val = parse_importexport_item(ps, is_colon)
394 +
                    ret = EXPR(:as, EXPR[ret, as_val], EXPR[as])
395 +
                end
396 +
            end
390 397
            break
391 398
        end
392 399
        prevpos = loop_check(ps, prevpos)

@@ -18,6 +18,8 @@
Loading
18 18
function _getindex(x::EXPR, i)
19 19
    if headof(x) === :abstract
20 20
        _abstract(x, i)
21 +
    elseif headof(x) === :as
22 +
        odda_event(x, i)
21 23
    elseif headof(x) === :block
22 24
        _block(x, i)
23 25
    elseif headof(x) === :braces

@@ -161,20 +161,21 @@
Loading
161 161
162 162
function parse_imports(ps::ParseState)
163 163
    kw = EXPR(ps)
164 -
    kwt = is_import(kw) ? :import : :using
164 +
    allow_as = is_import(kw)
165 +
    kwt = allow_as ? :import : :using
165 166
166 -
    arg = parse_dot_mod(ps)
167 +
    arg = parse_dot_mod(ps, false, allow_as)
167 168
    if !iscomma(ps.nt) && !iscolon(ps.nt)
168 169
        ret = EXPR(kwt, EXPR[arg], EXPR[kw])
169 170
    elseif iscolon(ps.nt)
170 171
        ret = EXPR(kwt, EXPR[EXPR(EXPR(:OPERATOR, next(ps)), EXPR[arg])], EXPR[kw])
171 172
        
172 -
        arg = parse_dot_mod(ps, true)
173 +
        arg = parse_dot_mod(ps, true, allow_as)
173 174
        push!(ret.args[1], arg)
174 175
        prevpos = position(ps)
175 176
        while iscomma(ps.nt)
176 177
            pushtotrivia!(ret.args[1], accept_comma(ps))
177 -
            arg = parse_dot_mod(ps, true)
178 +
            arg = parse_dot_mod(ps, true, allow_as)
178 179
            push!(ret.args[1], arg)
179 180
            prevpos = loop_check(ps, prevpos)
180 181
        end
@@ -184,7 +185,7 @@
Loading
184 185
        prevpos = position(ps)
185 186
        while iscomma(ps.nt)
186 187
            pushtotrivia!(ret, accept_comma(ps))
187 -
            arg = parse_dot_mod(ps)
188 +
            arg = parse_dot_mod(ps, false, allow_as)
188 189
            push!(ret, arg)
189 190
            prevpos = loop_check(ps, prevpos)
190 191
        end
Files Coverage
src 86.70%
Project Totals (15 files) 86.70%
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests
codecov-umbrella
Build #480323418 -
unittests

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading