catch merge conflicts in source and report them as such

release
Joe Groff 2010-04-06 13:34:26 -07:00
parent 430a05dcea
commit c3f8f5067e
4 changed files with 19 additions and 0 deletions

View File

@ -306,6 +306,9 @@ M: bad-inheritance summary
M: not-in-a-method-error summary M: not-in-a-method-error summary
drop "call-next-method can only be called in a method definition" ; drop "call-next-method can only be called in a method definition" ;
M: version-control-merge-conflict summary
drop "Version control merge conflict in source code" ;
GENERIC: expected>string ( obj -- str ) GENERIC: expected>string ( obj -- str )
M: f expected>string drop "end of input" ; M: f expected>string drop "end of input" ;

View File

@ -89,6 +89,12 @@ IN: bootstrap.syntax
"read-only" "read-only"
"call(" "call("
"execute(" "execute("
"<<<<<<"
"======"
">>>>>>"
"<<<<<<<"
"======="
">>>>>>>"
} [ "syntax" create drop ] each } [ "syntax" create drop ] each
"t" "syntax" lookup define-symbol "t" "syntax" lookup define-symbol

View File

@ -207,3 +207,5 @@ print-use-hook [ [ ] ] initialize
: ?run-file ( path -- ) : ?run-file ( path -- )
dup exists? [ run-file ] [ drop ] if ; dup exists? [ run-file ] [ drop ] if ;
ERROR: version-control-merge-conflict ;

View File

@ -257,4 +257,12 @@ IN: bootstrap.syntax
"call(" [ \ call-effect parse-call( ] define-core-syntax "call(" [ \ call-effect parse-call( ] define-core-syntax
"execute(" [ \ execute-effect parse-call( ] define-core-syntax "execute(" [ \ execute-effect parse-call( ] define-core-syntax
"<<<<<<<" [ version-control-merge-conflict ] define-core-syntax
"=======" [ version-control-merge-conflict ] define-core-syntax
">>>>>>>" [ version-control-merge-conflict ] define-core-syntax
"<<<<<<" [ version-control-merge-conflict ] define-core-syntax
"======" [ version-control-merge-conflict ] define-core-syntax
">>>>>>" [ version-control-merge-conflict ] define-core-syntax
] with-compilation-unit ] with-compilation-unit