Skip to content

Commit

Permalink
Merge 604b9b6 into e6c9bd4
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinEady committed Jun 1, 2023
2 parents e6c9bd4 + 604b9b6 commit 889e4f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pol-core/bscript/compiler/analyzer/Variables.cpp
Expand Up @@ -60,8 +60,8 @@ std::vector<std::shared_ptr<Variable>> Variables::remove_all_but( unsigned count
report.warning( removing->source_location, "local variable '", last_name,
"' was not used." );
}
variables_by_name.erase( itr );
removed.push_back( removing );
variables_by_name.erase( itr );
}
names_by_index.pop_back();
}
Expand Down
6 changes: 6 additions & 0 deletions pol-core/bscript/compiler/file/SourceLocation.cpp
Expand Up @@ -76,6 +76,12 @@ SourceLocation::SourceLocation( const SourceFileIdentifier* source_file_identifi
{
}

SourceLocation::SourceLocation( const SourceFileIdentifier* source_file_identifier,
const Range& range )
: source_file_identifier( source_file_identifier ), range( range )
{
}

SourceLocation::SourceLocation( const SourceFileIdentifier* source_file_identifier,
antlr4::ParserRuleContext& ctx )
: source_file_identifier( source_file_identifier ), range( ctx )
Expand Down
1 change: 1 addition & 0 deletions pol-core/bscript/compiler/file/SourceLocation.h
Expand Up @@ -44,6 +44,7 @@ class SourceLocation
public:
SourceLocation( const SourceFileIdentifier*, unsigned short line_number,
unsigned short character_column );
SourceLocation( const SourceFileIdentifier*, const Range& );
SourceLocation( const SourceFileIdentifier*, antlr4::ParserRuleContext& );
SourceLocation( const SourceFileIdentifier*, antlr4::tree::TerminalNode& );

Expand Down

0 comments on commit 889e4f1

Please sign in to comment.