Skip to content

Instantly share code, notes, and snippets.

@kubukoz
Created November 9, 2022 00:17
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kubukoz/894b049b5c1747f17c1e052754640b32 to your computer and use it in GitHub Desktop.
Save kubukoz/894b049b5c1747f17c1e052754640b32 to your computer and use it in GitHub Desktop.
git conflicts parsing as Scala
object main extends App {
object <<<<<<< {
def HEAD(s: String) = this
}
implicit class StringOps(s: String) {
def =======(i: Int) = s
def >>>>>>>(i: Int) = i
}
val git1 = 42
val a = 10
println(
<<<<<<< HEAD
"qux"
=======
"bar"
>>>>>>> git1-a
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment