From 5a3a01ac8b5e60b10389f3147bdc09ffbcc5a4ad Mon Sep 17 00:00:00 2001 From: arookas Date: Fri, 18 Dec 2015 19:50:55 -0500 Subject: [PATCH] Made compound statements their own AST node type. --- ssc/ast/nodes.statements.cs | 9 +++++++++ ssc/parser.cs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ssc/ast/nodes.statements.cs b/ssc/ast/nodes.statements.cs index b144b10..f535ad9 100644 --- a/ssc/ast/nodes.statements.cs +++ b/ssc/ast/nodes.statements.cs @@ -1,5 +1,14 @@ namespace arookas { + class sunCompoundStatement : sunNode + { + public sunCompoundStatement(sunSourceLocation location) + : base(location) + { + + } + } + class sunStatementBlock : sunNode { public sunStatementBlock(sunSourceLocation location) diff --git a/ssc/parser.cs b/ssc/parser.cs index 839d40f..7d41bd6 100644 --- a/ssc/parser.cs +++ b/ssc/parser.cs @@ -93,7 +93,7 @@ namespace arookas case __sunConstants.ROOT_STATEMENT: return new sunNode(location); case __sunConstants.STATEMENT: return new sunNode(location); case __sunConstants.STATEMENT_BLOCK: return new sunStatementBlock(location); - case __sunConstants.COMPOUND_STATEMENT: return new sunNode(location); + case __sunConstants.COMPOUND_STATEMENT: return new sunCompoundStatement(location); case __sunConstants.COMPOUND_STATEMENT_ITEM: return new sunNode(location); case __sunConstants.IMPORT_STATEMENT: return new sunImport(location);