pascalabcnet/TreeConverter/TreeRealization/exceptions.cs

69 lines
1.6 KiB
C#
Raw Permalink Normal View History

2015-06-01 22:15:17 +03:00
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
2015-05-14 22:35:07 +03:00
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);
}
}
}