 ! Copyright (C) 2009 Slava Pestov, Eduardo Cavazos, Joe Groff.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors combinators kernel locals.backend math parser
-quotations sequences sets splitting words ;
+USING: accessors combinators kernel locals.backend math
+namespaces parser quotations sequences sets splitting words ;
 IN: fry
 
-: _ ( -- * ) "Only valid inside a fry" throw ;
-: @ ( -- * ) "Only valid inside a fry" throw ;
+ERROR: not-in-a-fry ;
+
+SYMBOL: in-fry?
+
+SYNTAX: _ in-fry? get [ \ _ suffix! ] [ not-in-a-fry ] if ;
+
+SYNTAX: @ in-fry? get [ \ @ suffix! ] [ not-in-a-fry ] if ;
 
 ERROR: >r/r>-in-fry-error ;
 

        ] bi
    ] if-empty ;

SYNTAX: '[ parse-quotation fry append! ;

    dup { load-local load-locals get-local drop-locals } intersect
    [ >r/r>-in-fry-error ] unless-empty ;

PREDICATE: fry-specifier < word { POSTPONE: _ POSTPONE: @ } member-eq? ;

GENERIC: count-inputs ( quot -- n )

