]> gitweb.factorcode.org Git - factor.git/commitdiff
vocabs.parser: error on unbalanced private declarations.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 17 Jun 2015 01:47:57 +0000 (18:47 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 17 Jun 2015 01:47:57 +0000 (18:47 -0700)
core/vocabs/parser/parser.factor

index 1aa4d1fa05fc346a31e1969b124ec208a7a75005..3751db3fba33f654b6652703263a06294ecd9ef9 100644 (file)
@@ -94,13 +94,17 @@ TUPLE: no-current-vocab-error ;
 : current-vocab ( -- vocab )
     manifest get current-vocab>> [ no-current-vocab ] unless* ;
 
+ERROR: unbalanced-private-declaration vocab ;
+
 : begin-private ( -- )
     current-vocab name>> ".private" ?tail
-    [ drop ] [ ".private" append set-current-vocab ] if ;
+    [ unbalanced-private-declaration ]
+    [ ".private" append set-current-vocab ] if ;
 
 : end-private ( -- )
     current-vocab name>> ".private" ?tail
-    [ set-current-vocab ] [ drop ] if ;
+    [ set-current-vocab ]
+    [ unbalanced-private-declaration ] if ;
 
 : using-vocab? ( vocab -- ? )
     vocab-name manifest get search-vocab-names>> in? ;