From a7df6cb6955cb89799e5da52c7a0241c3b82adb4 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 16 Nov 2018 20:29:50 +0100 Subject: parse: factorize, improve comment. --- src/vhdl/parse.adb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb index 5b2dcea9d..7623d49c3 100644 --- a/src/vhdl/parse.adb +++ b/src/vhdl/parse.adb @@ -2463,13 +2463,7 @@ package body Parse is return Decl; end if; - if Current_Token /= Tok_Is then - Error_Msg_Parse ("'is' expected here"); - -- Act as if IS token was forgotten. - else - -- Skip 'is'. - Scan; - end if; + Expect_Scan (Tok_Is, "'is' expected here"); case Current_Token is when Tok_Left_Paren => @@ -2552,7 +2546,7 @@ package body Parse is when others => Error_Msg_Parse - ("type definition starting with a keyword such as RANGE, ARRAY"); + ("type definition starts with a keyword such as RANGE, ARRAY"); Error_Msg_Parse (" FILE, RECORD or '(' is expected here"); Eat_Tokens_Until_Semi_Colon; -- cgit v1.2.3