On Thu, May 27, 2010 at 12:53 PM, Jeremy Hughes <[email protected]> wrote: > QList<T> will exist when the functor is called. In code with the > unimportant bits elided: > > FUNCTOR: QList ( T -- ) ... ;FUNCTOR > SYNTAX: QLIST: scan QList ; > > CLASS: QPoint ; > CLASS: QList<QPoint> ; > > QLIST: QPoint > > This code barfs at line one because it tries to create QList<T> when > FUNCTOR: QList is defined; instead, it should create a QList<QPoint> at > the last line.
Functors only work with a small set of known syntax words. Your custom syntax words don't have functor versions defined, so they're going to run at parse time like they normally would, disregarding the surrounding FUNCTOR: definition. Grep for FUNCTOR-SYNTAX: to see how to extend functors to understand new syntax forms, but be warned, it isn't pretty. -Joe ------------------------------------------------------------------------------ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
