From cf18f77b4dc6e67abe8d4410552912740c07b409 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 2 Jan 2021 14:11:06 -0500 Subject: Tag top-level typedefs the same way as function definitions --- bin/hilex/c.l | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/hilex/c.l b/bin/hilex/c.l index 8c4a8ca1..ca99916a 100644 --- a/bin/hilex/c.l +++ b/bin/hilex/c.l @@ -55,7 +55,7 @@ enum|struct|typedef|union { BEGIN(TypeDecl); return Keyword; } -{ident}/[[:space:]]*("{"|"(") { +{ident}/[[:space:]]*"{" { BEGIN(pop); return IdentifierTag; } @@ -111,6 +111,9 @@ register|restrict|return|static|struct|switch|typedef|union|volatile|while | {ident}/"("[^)]*")"[[:space:]]*"{" { return (!depth ? IdentifierTag : Identifier); } +{ident}/"("[^)]*");" { + return (!depth ? IdentifierTag : Identifier); +} "//"([^\n]|"\\\n")* | "/*"([^*]|"*"[^/])*"*"+"/" { -- cgit 1.4.1