Created
October 29, 2014 05:32
-
-
Save moznion/03c2c737b315be1a9b89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $lpnum = 1; | |
for ($i++; $token = $tokens->[$i]; $i++) { | |
$token_type = $token->{type}; | |
if ($token_type == LEFT_PAREN) { | |
$lpnum++; | |
} | |
elsif ($token_type == RIGHT_PAREN) { | |
last if --$lpnum <= 0 ; | |
} | |
# ここでてきとうに処理する | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment