• marja's avatar
    [strong] Declaration-after-use errors. · 1eddcf5b
    marja authored
    We cannot yet detect use-before-declaration in general, because for that we'd
    need to analyze the context when compiling. But we can detect an error case
    where we first see a use, then a declaration.
    
    For this, I also added end position tracking (needed for error messages) to
    VariableProxy.
    
    Note: the position naming is completely inconsistent: start_position &
    end_position, position & end_position, pos & end_pos, beg_pos & end_pos, to name
    a few. This doesn't fix all of it, but tries to unify towards start_position &
    end_position whenever possible w/ minimal changes.
    
    BUG=
    
    Review URL: https://codereview.chromium.org/943543002
    
    Cr-Commit-Position: refs/heads/master@{#26880}
    1eddcf5b
scopes.h 27.5 KB