Made compound statements their own AST node type.
This commit is contained in:
parent
73257ed389
commit
5a3a01ac8b
2 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,14 @@
|
||||||
namespace arookas
|
namespace arookas
|
||||||
{
|
{
|
||||||
|
class sunCompoundStatement : sunNode
|
||||||
|
{
|
||||||
|
public sunCompoundStatement(sunSourceLocation location)
|
||||||
|
: base(location)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class sunStatementBlock : sunNode
|
class sunStatementBlock : sunNode
|
||||||
{
|
{
|
||||||
public sunStatementBlock(sunSourceLocation location)
|
public sunStatementBlock(sunSourceLocation location)
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace arookas
|
||||||
case __sunConstants.ROOT_STATEMENT: return new sunNode(location);
|
case __sunConstants.ROOT_STATEMENT: return new sunNode(location);
|
||||||
case __sunConstants.STATEMENT: return new sunNode(location);
|
case __sunConstants.STATEMENT: return new sunNode(location);
|
||||||
case __sunConstants.STATEMENT_BLOCK: return new sunStatementBlock(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.COMPOUND_STATEMENT_ITEM: return new sunNode(location);
|
||||||
|
|
||||||
case __sunConstants.IMPORT_STATEMENT: return new sunImport(location);
|
case __sunConstants.IMPORT_STATEMENT: return new sunImport(location);
|
||||||
|
|
Loading…
Reference in a new issue