aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/scanner.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/scanner.adb')
-rw-r--r--src/vhdl/scanner.adb30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb
index 1a5637e21..5d94fd470 100644
--- a/src/vhdl/scanner.adb
+++ b/src/vhdl/scanner.adb
@@ -243,31 +243,15 @@ package body Scanner is
return Current_Context.Line_Number;
end Get_Current_Line;
- function Get_Current_Column return Natural
- is
- Col : Natural;
- Name : Name_Id;
+ function Get_Current_Offset return Natural is
begin
- Coord_To_Position
- (Current_Context.Source_File,
- Current_Context.Line_Pos,
- Integer (Current_Context.Pos - Current_Context.Line_Pos),
- Name, Col);
- return Col;
- end Get_Current_Column;
-
- function Get_Token_Column return Natural
- is
- Col : Natural;
- Name : Name_Id;
+ return Natural (Current_Context.Pos - Current_Context.Line_Pos);
+ end Get_Current_Offset;
+
+ function Get_Token_Offset return Natural is
begin
- Coord_To_Position
- (Current_Context.Source_File,
- Current_Context.Line_Pos,
- Integer (Current_Context.Token_Pos - Current_Context.Line_Pos),
- Name, Col);
- return Col;
- end Get_Token_Column;
+ return Natural (Current_Context.Token_Pos - Current_Context.Line_Pos);
+ end Get_Token_Offset;
function Get_Token_Position return Source_Ptr is
begin