Created
October 26, 2016 03:19
-
-
Save toptensoftware/b4e4cceedb6b790be45fe2fec86dd2b2 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
| // Parenthesis? | |
| if (_tokenizer.Token == Token.OpenParens) | |
| { | |
| // Skip '(' | |
| _tokenizer.NextToken(); | |
| // Parse a top-level expression | |
| var node = ParseAddSubtract(); | |
| // Check and skip ')' | |
| if (_tokenizer.Token != Token.CloseParens) | |
| throw new SyntaxException("Missing close parenthesis"); | |
| _tokenizer.NextToken(); | |
| // Return | |
| return node; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment