PageRenderTime 34ms CodeModel.GetById 26ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/unmaintained/sandbox/syntax/syntax.factor

http://github.com/abeaumont/factor
Unknown | 26 lines | 17 code | 9 blank | 0 comment | 0 complexity | abe91afa9f4f1efd0bec12f0f049ad48 MD5 | raw file
 1! Copyright (C) 2009 Maxim Savchenko.
 2! See http://factorcode.org/license.txt for BSD license.
 3
 4USING: kernel sequences assocs namespaces lexer vocabs.parser sandbox ;
 5IN: sandbox.syntax
 6
 7<PRIVATE
 8
 9ERROR: sandbox-error vocab ;
10
11: sandbox-use+ ( alias -- )
12    dup whitelist get at [ add-use ] [ sandbox-error ] ?if ;
13
14PRIVATE>
15
16SYNTAX: APPLY: scan sandbox-use+ ;
17
18SYNTAX: APPLYING: ";" parse-tokens [ sandbox-use+ ] each ;
19
20REVEALING:
21    ! #!
22    HEX: OCT: BIN: f t CHAR: "
23    [ { T{
24    ] } ;
25
26REVEAL: ;