Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created October 21, 2009 03:28
Show Gist options
  • Save abuiles/214824 to your computer and use it in GitHub Desktop.
Save abuiles/214824 to your computer and use it in GitHub Desktop.
def finishP = "finish" ~> "{" ~> ("ambient"|"difuse"|"phong"|"phong_size") ~ valueP <~ "}" ^^
{
case "ambient" ~ color => ("ambient" ,color)
case "difuse" ~ color => ("difuse" ,color)
case "phong" ~ color => ("phong" ,color)
case "phong_color" ~ color => ("phong_color" ,color)
case "size" ~ color => ("size" ,color)
}
def manyFinish: Parser[(String,Double)] = finishP*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment