Sha256: bf2a790905684d601cdb063fa4c1a948c7d76a4e4516aa6c5b971e4e6dd8f748

Contents?: true

Size: 1.66 KB

Versions: 4

Compression:

Stored size: 1.66 KB

Contents

/* Copyright (c) 2024 Julian Benda
 *
 * This file is part of inkCPP which is released under MIT license.
 * See file LICENSE.txt or go to
 * https://github.com/JBenda/inkcpp for full license details.
 */
#include "command.h"

namespace ink
{
	// Command strings used by compiler
	const char* CommandStrings[] = {
			"inkcpp_STR",
			"inkcpp_INT",
			"inkcpp_BOOL",
			"inkcpp_FLOAT",
			"inkcpp_VALUE_POINTER",
			"inkcpp_DIVERT_VAL",
			"inkcpp_LIST",
			"\n",
			"<>",
			"void",
			"inkcpp_TAG",
			"inkcpp_DIVERT",
			"inkcpp_DIVERT_TO_VARIABLE",
			"inkcpp_TUNNEL",
			"inkcpp_FUNCTION",
			"done",
			"end",
			"->->",
			"~ret",

			"inkcpp_DEFINE_TEMP",
			"inkcpp_SET_VARIABLE",

			"ev",
			"/ev",
			"out",
			"pop",
			"du",
			"inkcpp_PUSH_VARIABLE_VALUE",
			"visit",
			"turn",
			"inkcpp_READ_COUNT",
			"seq",
			"srnd",

			"str",
			"/str",
			"#",
			"/#",

			"inkcpp_CHOICE",
			"thread",

			"range",

			"+",
			"-",
			"/",
			"*",
			"%",
			"rnd",
			"==",
			">",
			"<",
			">=",
			"<=",
			"!=",
			"&&",
			"||",
			"MIN",
			"MAX",
			"?",
			"!?",
			"L^",
			"listInt",

			"!",
			"~",
			"LIST_COUNT",
			"LIST_MIN",
			"LIST_MAX",
			"readc",
			"turns",
			"lrnd",
			"FLOOR",
			"CEILING",
			"INT",
			"LIST_ALL",
			"LIST_INVERT",
			"LIST_VALUE",
			"choiceCnt",

			"START_CONTAINER",
			"END_CONTAINER",

			"CALL_EXTERNAL"
	};

	template<unsigned A, unsigned B>
	struct equal {
		static_assert(A == B, "Not equal!");
	};
	equal<sizeof(CommandStrings) / sizeof(const char*), (int)(Command::NUM_COMMANDS)> dum;
	static_assert(sizeof(CommandStrings) / sizeof(const char*) == (int)Command::NUM_COMMANDS, "CommandStrings list muss match Command enumeration");
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
inkcpp_rb-0.1.3 ext/inkcpp_rb/inkcpp/inkcpp_compiler/command.cpp
inkcpp_rb-0.1.2 ext/inkcpp_rb/inkcpp/inkcpp_compiler/command.cpp
inkcpp_rb-0.1.1 ext/inkcpp_rb/inkcpp/inkcpp_compiler/command.cpp
inkcpp_rb-0.1.0 ext/inkcpp_rb/inkcpp/inkcpp_compiler/command.cpp