code generations for unary operators
This commit is contained in:
parent
07079366b8
commit
e6b20b5aa9
7 changed files with 202 additions and 153 deletions
21
Compiler/Generator/NotSpecifiedException.cs
Normal file
21
Compiler/Generator/NotSpecifiedException.cs
Normal 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.";
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue