have TYPEDEF:, STRUCT: etc. throw an error if you try to define a c type name ending with asterisk

db4
Joe Groff 2010-02-23 10:16:18 -08:00
parent 482aed8ecc
commit 00a7559d55
1 changed files with 7 additions and 1 deletions

View File

@ -46,8 +46,14 @@ IN: alien.parser
"callback-library"
} reset-props ;
ERROR: *-in-c-type-name name ;
: validate-c-type-name ( name -- name )
dup "*" tail?
[ *-in-c-type-name ] when ;
: CREATE-C-TYPE ( -- word )
scan current-vocab create {
scan validate-c-type-name current-vocab create {
[ fake-definition ]
[ set-word ]
[ reset-c-type ]