BadScript 2
Loading...
Searching...
No Matches
BadInstruction.cs
Go to the documentation of this file.
2
4
8public struct BadInstruction
9{
13 public readonly BadOpCode OpCode;
14
18 public readonly object[] Arguments;
19
23 public readonly BadSourcePosition Position;
24
31 public BadInstruction(BadOpCode opCode, BadSourcePosition position, params object[] arguments)
32 {
33 OpCode = opCode;
34 Position = position;
35 Arguments = arguments;
36 }
37
39 public override string ToString()
40 {
41 return $"{OpCode} {string.Join(" ", Arguments.Select(x => x.ToString()))}";
42 }
43}
Describes a specific position inside a source file.
Contains Shared Data Structures and Functionality.
Contains the Virtual Machine Implementation.
BadOpCode
Defines the Operations that the BadVirtualMachine can execute.
Definition BadOpCode.cs:7
Implements a single instruction for the BadVirtualMachine.
BadInstruction(BadOpCode opCode, BadSourcePosition position, params object[] arguments)
Creates a new BadInstruction instance.
readonly object[] Arguments
The arguments of this Instruction.
readonly BadSourcePosition Position
The position of this Instruction in the source code.
readonly BadOpCode OpCode
The OpCode of this Instruction.