nested-comments: remove this vocab. we have /* */ which is good enough for now.
broken case: (* : print-broken ( -- ) "*)" ; *) not worth fixing, please don't bring this back :) its functionality will be replaced soon.db4
parent
280177279a
commit
cf0cb4aedc
|
@ -1,7 +1,7 @@
|
|||
USING: accessors alien alien.c-types alien.data alien.syntax
|
||||
arrays byte-arrays classes.struct destructors fry io
|
||||
io.encodings.string io.encodings.utf16n kernel literals locals
|
||||
math nested-comments sequences strings system tools.ps
|
||||
math sequences strings system tools.ps
|
||||
windows.errors windows.handles windows.kernel32 windows.ntdll
|
||||
windows.types ;
|
||||
IN: tools.ps.windows
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
USING: alien.c-types byte-arrays kernel locals sequences
|
||||
windows.advapi32 windows.errors math windows
|
||||
windows.kernel32 windows.time accessors alien.data
|
||||
nested-comments windows.types classes.struct continuations ;
|
||||
windows.types classes.struct continuations ;
|
||||
IN: windows.registry
|
||||
|
||||
ERROR: open-key-failed key subkey mode error-string ;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
! Copyright (C) 2009 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: tools.test c.preprocessor kernel accessors multiline
|
||||
nested-comments ;
|
||||
USING: tools.test c.preprocessor kernel accessors multiline ;
|
||||
IN: c.preprocessor.tests
|
||||
|
||||
[ "vocab:c/tests/test1/test1.c" start-preprocess-file ]
|
||||
|
@ -10,18 +9,10 @@ IN: c.preprocessor.tests
|
|||
{ "yo\n\n\n\nyo4\n" }
|
||||
[ "vocab:c/tests/test2/test2.c" start-preprocess-file nip ] unit-test
|
||||
|
||||
(*
|
||||
/*
|
||||
[ "vocab:c/tests/test3/test3.c" start-preprocess-file ]
|
||||
[ "\"BOO\"" = ] must-fail-with
|
||||
*)
|
||||
*/
|
||||
|
||||
{ V{ "\"omg\"" "\"lol\"" } }
|
||||
[ "vocab:c/tests/test4/test4.c" start-preprocess-file drop warnings>> ] unit-test
|
||||
|
||||
|
||||
(*
|
||||
f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
|
||||
f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
|
||||
int i[] = { 1, 23, 4, 5, };
|
||||
char c[2][6] = { "hello", "" };
|
||||
*)
|
||||
|
|
|
@ -6,7 +6,7 @@ combinators.short-circuit constructors continuations destructors
|
|||
forestdb.ffi forestdb.utils fry generalizations io.directories
|
||||
io.encodings.string io.encodings.utf8 io.files.temp io.pathnames
|
||||
kernel layouts libc make math math.parser math.ranges multiline
|
||||
namespaces sequences system tools.test nested-comments ;
|
||||
namespaces sequences system tools.test ;
|
||||
IN: forestdb.lib
|
||||
|
||||
{ [ cell-bits 32 = ] [ os windows? ] } 0&& [
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
! Copyright (C) 2009 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors eval kernel lexer nested-comments tools.test ;
|
||||
IN: nested-comments.tests
|
||||
|
||||
! Correct
|
||||
{ } [
|
||||
"USE: nested-comments (* comment *)" eval( -- )
|
||||
] unit-test
|
||||
|
||||
{ } [
|
||||
"USE: nested-comments (* comment*)" eval( -- )
|
||||
] unit-test
|
||||
|
||||
{ } [
|
||||
"USE: nested-comments (* comment
|
||||
*)" eval( -- )
|
||||
] unit-test
|
||||
|
||||
{ } [
|
||||
"USE: nested-comments (* comment
|
||||
*)" eval( -- )
|
||||
] unit-test
|
||||
|
||||
{ } [
|
||||
"USE: nested-comments (* comment
|
||||
*)" eval( -- )
|
||||
] unit-test
|
||||
|
||||
{ } [
|
||||
"USE: nested-comments (* comment
|
||||
(* *)
|
||||
|
||||
*)" eval( -- )
|
||||
] unit-test
|
||||
|
||||
! Malformed
|
||||
[
|
||||
"USE: nested-comments (* comment
|
||||
(* *)" eval( -- )
|
||||
] [
|
||||
error>> T{ unexpected f "*)" f } =
|
||||
] must-fail-with
|
|
@ -1,22 +0,0 @@
|
|||
! Copyright (C) 2009 blei, Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: kernel locals make math multiline sequences ;
|
||||
IN: nested-comments
|
||||
|
||||
: (count-subsequences) ( count substring string n -- count' )
|
||||
[ 2dup ] dip start* [
|
||||
pick length +
|
||||
[ 1 + ] 3dip (count-subsequences)
|
||||
] [
|
||||
2drop
|
||||
] if* ;
|
||||
|
||||
: count-subsequences ( subseq seq -- n )
|
||||
[ 0 ] 2dip 0 (count-subsequences) ;
|
||||
|
||||
: parse-nestable-comment ( parsed-vector left-to-parse -- parsed-vector )
|
||||
1 - "*)" parse-multiline-string
|
||||
[ "(*" ] dip
|
||||
count-subsequences + dup 0 > [ parse-nestable-comment ] [ drop ] if ;
|
||||
|
||||
SYNTAX: (* 1 parse-nestable-comment ;
|
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2011 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors calendar fonts fry io io.files io.files.info
|
||||
kernel math models models.arrow namespaces nested-comments
|
||||
progress-bars threads ui.gadgets.labels ui.gadgets.panes ;
|
||||
kernel math models models.arrow namespaces progress-bars
|
||||
threads ui.gadgets.labels ui.gadgets.panes ;
|
||||
IN: progress-bars.models
|
||||
|
||||
SYMBOL: progress-bar
|
||||
|
|
Loading…
Reference in New Issue