2using System.Collections.Generic;
25 #region Private Variables
33 #region Private Methods
44 if (objectValue.GetType() == typeof(
string))
45 return "\"" + objectValue +
"\"";
47 return objectValue.ToString();
52 #region Public Static Methods
91 #region Public Methods
96 var literal =
new StringBuilder(input.Length + 2);
98 foreach (var c
in input)
105 literal.Append(
"\\\"");
109 literal.Append(
"\\a");
113 literal.Append(
"\\b");
117 literal.Append(
"\\n");
121 literal.Append(
"\\r");
125 literal.Append(
"\\t");
129 if (
char.GetUnicodeCategory(c) != System.Globalization.UnicodeCategory.Control)
133 literal.Append(
@"\u");
134 literal.Append(((ushort)c).
ToString(
"x4"));
142 return literal.ToString();
159 else if (
m_objectValue.GetType().ToString() ==
"System.Char")
182 return "<" + scriptFunction.Name +
"@" + scriptFunction.
EntryPoint.
Address.ToString(
"X8") +
">";
196 #region Public Properties
A function, forward declared in a script.
An instruction in a virtual intermediate language.
Instruction InstructionPointer
Operand(OperandType operandType, object objectValue, object objectIndex)
static Operand MemberVariable(string identifier, object val)
static Operand Literal(object val)
override string ToString()
OperandType m_operandType
static Operand AllocateInstructionPointer(Instruction instruction)
static Operand CreatePointer(string identifier, string pointer)
string ToLiteral(string input)
string ToString(object objectValue)
static Operand AllocateFunctionPointer(Function function)
static Operand AllocateRoutinePointer(Routine routine)
static Operand Variable(string identifier)
A Routine is an abstract representation of a method.