Skip to content
This repository has been archived by the owner on Feb 4, 2019. It is now read-only.

Support for "finally" clauses #413

Merged
merged 2 commits into from
Mar 26, 2016

Conversation

sburnicki
Copy link
Member

finally clauses are now correctly parsed and executed.
Fixes #411.

@@ -424,11 +424,20 @@ private StatementAst BuildBreakStatementAst(ParseTreeNode parseTreeNode)

StatementAst BuildTryStatementAst(ParseTreeNode parseTreeNode)
{
var subClauses = parseTreeNode.ChildNodes[0].ChildNodes;
var catchClauses = subClauses[2];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the grammar, the 3rd element of the specific parseTree is either a "finally_clause" or "catch_clauses" sub tree. The latter one has multiple childs representing multiple cacth clauses.

The following functions care about finding the concrete catch clauses in the "sub tree".
However, multiple catch clauses are not yet evaluated correctly, see #414.

@sburnicki
Copy link
Member Author

Any further comments or may this get merged?

@ForNeVeR
Copy link
Contributor

Looks good to me. My vote for merge.

@JayBazuzi JayBazuzi merged commit 78587b8 into Pash-Project:master Mar 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants