Fix assert-depth usage
							parent
							
								
									4533e0e55e
								
							
						
					
					
						commit
						66c9eb089a
					
				| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
USING: arrays math parser tools.test kernel generic words
 | 
					USING: arrays math parser tools.test kernel generic words
 | 
				
			||||||
io.streams.string namespaces classes effects source-files
 | 
					io.streams.string namespaces classes effects source-files
 | 
				
			||||||
assocs sequences strings io.files definitions continuations
 | 
					assocs sequences strings io.files definitions continuations
 | 
				
			||||||
sorting tuples compiler.units ;
 | 
					sorting tuples compiler.units debugger ;
 | 
				
			||||||
IN: temporary
 | 
					IN: temporary
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[
 | 
					[
 | 
				
			||||||
| 
						 | 
					@ -426,3 +426,7 @@ IN: temporary
 | 
				
			||||||
] unit-test
 | 
					] unit-test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ t ] [ "foo" "temporary" lookup symbol? ] unit-test
 | 
					[ t ] [ "foo" "temporary" lookup symbol? ] unit-test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ "resource:core/parser/test/assert-depth.factor" run-file ]
 | 
				
			||||||
 | 
					[ relative-overflow-stack { 1 2 3 } sequence= ]
 | 
				
			||||||
 | 
					must-fail-with
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -507,7 +507,7 @@ SYMBOL: interactive-vocabs
 | 
				
			||||||
    ] recover ;
 | 
					    ] recover ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: run-file ( file -- )
 | 
					: run-file ( file -- )
 | 
				
			||||||
    [ [ parse-file call ] keep ] assert-depth drop ;
 | 
					    [ dup parse-file call ] assert-depth drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: ?run-file ( path -- )
 | 
					: ?run-file ( path -- )
 | 
				
			||||||
    dup resource-exists? [ run-file ] [ drop ] if ;
 | 
					    dup resource-exists? [ run-file ] [ drop ] if ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					1 2 3
 | 
				
			||||||
| 
						 | 
					@ -80,11 +80,10 @@ DEFER: <% delimiter
 | 
				
			||||||
            "quiet" on
 | 
					            "quiet" on
 | 
				
			||||||
            parser-notes off
 | 
					            parser-notes off
 | 
				
			||||||
            templating-vocab use+
 | 
					            templating-vocab use+
 | 
				
			||||||
            dup source-file file set ! so that reload works properly
 | 
					            ! so that reload works properly
 | 
				
			||||||
            [
 | 
					            dup source-file file set
 | 
				
			||||||
                ?resource-path file-contents
 | 
					            dup ?resource-path file-contents
 | 
				
			||||||
                [ eval-template ] [ html-error. drop ] recover
 | 
					            [ eval-template ] [ html-error. drop ] recover
 | 
				
			||||||
            ] keep
 | 
					 | 
				
			||||||
        ] with-file-vocabs
 | 
					        ] with-file-vocabs
 | 
				
			||||||
    ] assert-depth drop ;
 | 
					    ] assert-depth drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue