Skip to content

Instantly share code, notes, and snippets.

@alllex
Created April 23, 2021 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alllex/1a2e4b00a68abe99d505a36404d381bd to your computer and use it in GitHub Desktop.
Save alllex/1a2e4b00a68abe99d505a36404d381bd to your computer and use it in GitHub Desktop.
val myStaks = object : StaksParser<List<Triple<String, String, String>>() {
val a = tagText("a")
val b = tagText("b")
val c = tagText("c")
val lst = list("el") { Triple(a(), b(), c()) } // list function now accepts the lamda that does the parsing directly
}
val lst = myStaks.lst(inp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment