Paste: sandbox/syntax.factor

Author: Maxim Savchenko
Mode: factor
Date: Wed, 1 Apr 2009 20:01:10
Plain Text |
! Copyright (C) 2009 Maxim Savchenko.
! See http://factorcode.org/license.txt for BSD license.

USING: kernel sequences assocs namespaces lexer vocabs.parser sandbox ;
IN: sandbox.syntax

<PRIVATE

ERROR: sandbox-error vocab ;

: sandbox-use+ ( alias -- )
    dup whitelist get at [ use+ ] [ sandbox-error ] ?if ;

PRIVATE>

SYNTAX: APPLY: scan sandbox-use+ ;

SYNTAX: APPLYING: ";" parse-tokens [ sandbox-use+ ] each ;

<REVEAL
    ! #!
    HEX: OCT: BIN: f t CHAR: "
    [ { T{
    ] } ;
REVEAL>

New Annotation

Summary:
Author:
Mode:
Body: