Skip to content

Instantly share code, notes, and snippets.

@zixaphir
Created September 15, 2012 07:54
Show Gist options
  • Save zixaphir/3726873 to your computer and use it in GitHub Desktop.
Save zixaphir/3726873 to your computer and use it in GitHub Desktop.
for i in [0..@value.length - 1]
switch @value[i]
when '(' then depth++
when ')' then depth--
when '"'
if toggle1 then toggle1 = false
else then toggle1 = true
when '\''
if toggle2 then toggle2 = false
else then toggle2 = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment