diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-05-29 08:45:55 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-05-29 08:45:55 +0200 |
commit | 5035b126d932529683640867cdf8fe686d7f7cac (patch) | |
tree | 7a48dd954794cf10938509a459a5a9cabf7fd86c /src/vhdl/vhdl-scanner.adb | |
parent | 7619ac406427a30e2963e11ad67b43b6aae26ee5 (diff) | |
download | ghdl-5035b126d932529683640867cdf8fe686d7f7cac.tar.gz ghdl-5035b126d932529683640867cdf8fe686d7f7cac.tar.bz2 ghdl-5035b126d932529683640867cdf8fe686d7f7cac.zip |
vhdl-disp_vhdl: print literals and identifiers from the source.
Add Literal_Length and set it in the parser.
Diffstat (limited to 'src/vhdl/vhdl-scanner.adb')
-rw-r--r-- | src/vhdl/vhdl-scanner.adb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-scanner.adb b/src/vhdl/vhdl-scanner.adb index c17f3553e..1b3243761 100644 --- a/src/vhdl/vhdl-scanner.adb +++ b/src/vhdl/vhdl-scanner.adb @@ -311,6 +311,11 @@ package body Vhdl.Scanner is return Current_Context.Token_Pos; end Get_Token_Position; + function Get_Token_Length return Int32 is + begin + return Int32 (Current_Context.Pos - Current_Context.Token_Pos); + end Get_Token_Length; + function Get_Position return Source_Ptr is begin return Current_Context.Pos; |