disable parsing of string c-types

db4
Joe Groff 2009-09-27 16:06:13 -05:00
parent 630e5ecc3b
commit 4e68c43f3d
1 changed files with 4 additions and 4 deletions
basis/alien/parser

View File

@ -6,17 +6,17 @@ kernel parser sequences splitting words fry locals lexer
namespaces summary math vocabs.parser ;
IN: alien.parser
: parse-c-type-name ( name -- word/string )
[ search ] keep or ;
: parse-c-type-name ( name -- word )
dup search [ nip ] [ no-word ] if* ;
: parse-c-type ( string -- array )
{
{ [ dup "void" = ] [ drop void ] }
{ [ CHAR: ] over member? ] [ parse-array-type parse-c-type-name prefix ] }
{ [ dup search c-type-word? ] [ parse-c-type-name ] }
{ [ dup c-types get at ] [ ] }
{ [ "**" ?tail ] [ drop void* ] }
{ [ "*" ?tail ] [ parse-c-type-name resolve-pointer-type ] }
[ no-c-type ]
[ parse-c-type-name no-c-type ]
} cond ;
: scan-c-type ( -- c-type )