]> gitweb.factorcode.org Git - factor.git/blob - core/parser/notes/notes.factor
3f702d375df9dc84ad6cc4c9cb8943a7235bb41f
[factor.git] / core / parser / notes / notes.factor
1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: namespaces kernel source-files lexer accessors io math.parser ;
4 IN: parser.notes
5
6 SYMBOL: parser-notes
7
8 t parser-notes set-global
9
10 : parser-notes? ( -- ? )
11     parser-notes get "quiet" get not and ;
12
13 : note. ( str -- )
14     parser-notes? [
15         file get [ path>> write ":" write ] when* 
16         lexer get [ line>> number>string write ": " write ] when*
17         "Note:" print dup print
18     ] when drop ;