pascalabcnet/TreeConverter/TreeRealization/exceptions.cs
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

68 lines
1.5 KiB
C#

using System;
namespace PascalABCCompiler.TreeRealization
{
public class throw_statement_node : statement_node, SemanticTree.IThrowNode
{
private expression_node _excpetion;
public throw_statement_node(expression_node exception,location loc) :
base(loc)
{
_excpetion = exception;
}
public expression_node excpetion
{
get
{
return _excpetion;
}
}
public SemanticTree.IExpressionNode exception_expresion
{
get
{
return _excpetion;
}
}
public override semantic_node_type semantic_node_type
{
get
{
return semantic_node_type.throw_statement;
}
}
public override void visit(SemanticTree.ISemanticVisitor visitor)
{
visitor.visit(this);
}
}
public class rethrow_statement_node : statement_node, SemanticTree.IRethrowStatement
{
public rethrow_statement_node(location loc) :
base(loc)
{
}
public override semantic_node_type semantic_node_type
{
get
{
return semantic_node_type.rethrow_statement;
}
}
public override void visit(SemanticTree.ISemanticVisitor visitor)
{
visitor.visit(this);
}
}
}