﻿using System;

namespace BlasmComp {
	public struct ErrorInfo {
		public string code;
		public string msg;

		public ErrorInfo(string c, string m) {
			code = c;
			msg = m;
		}
	}
	public struct WarningInfo{
		public string code;
		public string msg;

		public WarningInfo(string c, string m) {
			code = c;
			msg = m;
		}
	}

	public struct Errors {
		public struct Lexer {
			public static ErrorInfo IncludeFileNotFound = new ErrorInfo("004", "Included file could not be found");
		}
		public struct PreProcessor {
			public static ErrorInfo DefineAlreadyDefined = new ErrorInfo("003", "Attempt to redefine a macro");
			public static ErrorInfo PrePostFixIncDecOnNonVariable = new ErrorInfo("007", "Can not apply a pre/post fix increment/decrement to a non variable");
			public static ErrorInfo IfndefMissingEndif = new ErrorInfo("010", "#ifndef missing matching endif");
			public static ErrorInfo EndifMissingIf = new ErrorInfo("010", "#endif missing matching if statment");
		}
	}
	public struct Warnings{
		public struct Lexer {
			public static WarningInfo UnknownCharacter = new WarningInfo("008", "An unknown character was found, ignoring");
			public static WarningInfo IncludeMissingFile = new WarningInfo("005", "#include does not have a file path, ignoring include");
		}
		public struct PreProcessor {
			public static WarningInfo DefineMissingName = new WarningInfo("001", "#define does not have a name, ignoring define");
			public static WarningInfo DefineLiteral = new WarningInfo("002", "#define name can not be a built in literal, ignoring define");
			public static WarningInfo UndefineMissingName = new WarningInfo("006", "#udef does not have a name, ignoring udef");
			public static WarningInfo IfndefMissingName = new WarningInfo("009", "#ifndef does not have a name, ignoring ifndef");
		}
	}
}