quotation
Factor documentation > Factor handbook > The language > Collections > Quotations
Next:quotation? ( object -- ? )


Vocabulary
quotations

Word description
The class of quotations. See Quotation syntax for syntax and Quotations for general information.

Definition
USING: arrays ;

IN: quotations

BUILTIN: quotation
{ array array read-only initial: { } } cached-effect
cache-counter ;


Methods
USING: accessors bootstrap.image.private quotations ;

M: quotation '
[
array>> ' quotation
[ emit f ' emit f ' emit 0 emit ] emit-object
] cache-eql-object ;


USING: fjsc kernel make quotations sequences ;

M: quotation (parse-factor-quotation)
[ [ (parse-factor-quotation) , ] each ] { } make
ast-quotation boa ;


USING: arrays io kernel quotations serialize serialize.private
;

M: quotation (serialize)
[ 113 write1 [ >array (serialize) ] [ add-object ] bi ]
serialize-shared ;


USING: compiler.tree.propagation.call-effect
compiler.tree.propagation.inlining quotations ;

M: quotation add-quot-to-history add-to-history ;


USING: compiler.tree.propagation.call-effect
compiler.tree.propagation.inlining quotations ;

M: quotation already-inlined-quot? already-inlined? ;


USING: accessors compiler.tree.propagation.call-effect kernel
quotations ;

M: quotation cached-effect
dup cached-effect-valid?
[ cached-effect>> ] [ [ safe-infer dup ] keep save-effect ]
if ;


USING: kernel kernel.private quotations ;

M: quotation call (call) ;


USING: quotations stack-checker ui.tools.operations ;

M: quotation com-stack-effect infer. ;


USING: locals.rewrite.closures quotations sequences ;

M: quotation defs-vars* [ defs-vars* ] each ;


USING: compiler.units kernel quotations stack-checker
tools.disassembler words ;

M: quotation disassemble
[ dup infer define-temp ] with-compilation-unit disassemble
;


USING: fjsc kernel make quotations sequences ;

M: quotation fjsc-parse
[ [ (parse-factor-quotation) , ] each ] { } make
ast-expression boa ;


USING: fuel.pprint fuel.pprint.private quotations ;

M: quotation fuel-pprint "[" "]" fuel-pprint-sequence ; inline


USING: accessors quotations sequences ;

M: quotation length array>> length ;


USING: math.vectors quotations reports.noise sequences ;

M: quotation noise [ noise ] map vsum { 1/4 1/2 } v+ ;


USING: accessors quotations sequences.private ;

M: quotation nth-unsafe array>> nth-unsafe ;


USING: kernel prettyprint.custom quotations ;

M: quotation pprint-delims drop \ [ \ ] ;


USING: locals.rewrite.sugar quotations ;

M: quotation rewrite-element rewrite-sugar* ;


USING: locals.rewrite.sugar quotations sequences ;

M: quotation rewrite-literal? [ rewrite-literal? ] any? ;


USING: locals.rewrite.closures quotations sequences ;

M: quotation uses-vars* [ uses-vars* ] each ;