chakra-core / ChakraCore

ChakraCore is an open source Javascript engine with a C API.
MIT License
9.12k stars 1.2k forks source link

Request: SyntaxError message for Merge conflict marker (as detected by TypeScript) #3698

Open dilijev opened 7 years ago

dilijev commented 7 years ago

Typescript has a great error message. When encountering lines generated by a merge conflict (and left in if unresolved or incorrectly resolved):

error TS1185: Merge conflict marker encountered.

Note: This wouldn't be able to detect markers inside of multiline-strings.

/cc @bterlson

bterlson commented 7 years ago

Should detect diff3 format as described here as well: https://github.com/Microsoft/TypeScript/issues/16129.

dilijev commented 7 years ago

@bterlson Would detecting this potentially cause a spec violation? I'd assume the presence of such tokens would cause a SyntaxError anyway, so we'd just be giving a helpful message. Just want to make sure.

dilijev commented 7 years ago

Note: This wouldn't be able to detect markers inside of multiline-strings.

bterlson commented 7 years ago

@dilijev no spec violation, still a syntax error just with a nicer message.