Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21396: Updates the debugger code for changes in Amalgam debugger output #18

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amalgam-lang",
"version": "2.1.0",
"version": "2.1.1",
"type": "commonjs",
"publisher": "howso",
"displayName": "Amalgam Language",
Expand Down
7 changes: 4 additions & 3 deletions src/debugger/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export enum RuntimeEvent {
export enum RuntimeStackType {
CALL = "Call", // The amalgam "call" stack
CONSTRUCTION = "Construction", // The construction stack
INTERPRET_NODE = "Interpret node", // Standard debugger call stack
INTERPRET_NODE = "Interpret node", // Standard debugger call stack Amalgam<54.3.8
OPCODE = "Opcode" // Standard debugger call stack Amalgam>=54.3.8
}

/** The types of breakpoints */
Expand Down Expand Up @@ -186,7 +187,7 @@ export class AmalgamRuntime extends EventEmitter {
breakpointLine: /^ {2}(?<line>\d+)(?: (?<file>.+))?$/gm,
// Breakpoints and stack are matched via the header line and existing subsequent nested lines
breakpoints: /^(?<type>Line) Breakpoints:\n(?<brs>^(?:\s{2}.+)+)$/gm,
stack: /^(?<type>Interpret node) stack:\n(?<frames>^(?:\s{2}.+)+)$/gm,
stack: /^(?<type>Interpret node|Opcode) stack:\n(?<frames>^(?:\s{2}.+)+)$/gm,
// Expression results match all lines up to final empty line
expression: /^(?<value>[\s\S]+)\n{2}$/gm,
// Results match all lines starting with 2 spaces
Expand Down Expand Up @@ -823,7 +824,7 @@ export class AmalgamRuntime extends EventEmitter {
while ((matches = reg.exec(lines)) != null) {
if (matches.groups) {
const type = matches.groups.type;
if (type !== RuntimeStackType.INTERPRET_NODE) {
if (type !== RuntimeStackType.INTERPRET_NODE && type !== RuntimeStackType.OPCODE) {
continue;
}
let frameReg: RegExp;
Expand Down
Loading