Skip to content

Commit

Permalink
Add Range ctor to SourceLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinEady committed Jun 1, 2023
1 parent 3378112 commit 4711364
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pol-core/bscript/compiler/file/SourceLocation.cpp
Expand Up @@ -76,6 +76,11 @@ 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 4711364

Please sign in to comment.