code generations for unary operators

This commit is contained in:
Clemens-Dautermann 2020-08-21 00:18:21 +02:00
parent 07079366b8
commit e6b20b5aa9
7 changed files with 202 additions and 153 deletions

View file

@ -0,0 +1,21 @@
using System;
using Compiler.Lexer;
using Compiler.Parser.Nodes;
namespace Compiler.Generator
{
public class NotSpecifiedException : Exception
{
public override string Message { get; }
public NotSpecifiedException(NodeType nodeType)
{
Message = $"No code generation for {nodeType} specified.";
}
public NotSpecifiedException(NodeType nodeType, OperatorType operatorType)
{
Message = $"No code generation for {nodeType}:{operatorType} specified.";
}
}
}