vocabs.parser: error on unbalanced private declarations.
parent
8b6c743e02
commit
8744d66467
|
@ -94,13 +94,17 @@ TUPLE: no-current-vocab-error ;
|
||||||
: current-vocab ( -- vocab )
|
: current-vocab ( -- vocab )
|
||||||
manifest get current-vocab>> [ no-current-vocab ] unless* ;
|
manifest get current-vocab>> [ no-current-vocab ] unless* ;
|
||||||
|
|
||||||
|
ERROR: unbalanced-private-declaration vocab ;
|
||||||
|
|
||||||
: begin-private ( -- )
|
: begin-private ( -- )
|
||||||
current-vocab name>> ".private" ?tail
|
current-vocab name>> ".private" ?tail
|
||||||
[ drop ] [ ".private" append set-current-vocab ] if ;
|
[ unbalanced-private-declaration ]
|
||||||
|
[ ".private" append set-current-vocab ] if ;
|
||||||
|
|
||||||
: end-private ( -- )
|
: end-private ( -- )
|
||||||
current-vocab name>> ".private" ?tail
|
current-vocab name>> ".private" ?tail
|
||||||
[ set-current-vocab ] [ drop ] if ;
|
[ set-current-vocab ]
|
||||||
|
[ unbalanced-private-declaration ] if ;
|
||||||
|
|
||||||
: using-vocab? ( vocab -- ? )
|
: using-vocab? ( vocab -- ? )
|
||||||
vocab-name manifest get search-vocab-names>> in? ;
|
vocab-name manifest get search-vocab-names>> in? ;
|
||||||
|
|
Loading…
Reference in New Issue