From 1db60a0e91a18ddcc7c4d0c08e5c07adc8c59831 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 10 Feb 2016 04:58:22 +0100 Subject: evaluation: handle whitespace for 'value. --- src/vhdl/scanner.adb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/vhdl/scanner.adb') diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb index 84d334d89..b56c04e9a 100644 --- a/src/vhdl/scanner.adb +++ b/src/vhdl/scanner.adb @@ -84,7 +84,7 @@ package body Scanner is | '_' | '|' | '*' => Special_Character, -- 4. the space characters - ' ' | No_Break_Space => Space_Character, + ' ' | NBSP => Space_Character, -- 5. lower case letters 'a' .. 'z' | LC_German_Sharp_S .. LC_O_Diaeresis | @@ -1901,4 +1901,15 @@ package body Scanner is return File_Pos_To_Location (Current_Context.Source_File, Current_Context.Token_Pos); end Get_Token_Location; + + function Is_Whitespace (C : Character) return Boolean is + begin + if C = ' ' then + return True; + elsif Vhdl_Std > Vhdl_87 and C = NBSP then + return True; + else + return False; + end if; + end Is_Whitespace; end Scanner; -- cgit v1.2.3