Skip to content

interpreter: implement missing opcodes and Value traits#29

Closed
gabrielhnf wants to merge 1 commit into
uutils:mainfrom
gabrielhnf:interpreter-add-operations
Closed

interpreter: implement missing opcodes and Value traits#29
gabrielhnf wants to merge 1 commit into
uutils:mainfrom
gabrielhnf:interpreter-add-operations

Conversation

@gabrielhnf
Copy link
Copy Markdown
Contributor

The interpreter was missing handlers for most opcodes, leaving them as todo!()
This PR fills in some of the remaining unary and binary opcode implementations in the VM, along with the supporting traits and methods on Value needed to make them work.

Concat is moved from the unary to the binary section of OpCode since it operates on two values.

PartialOrd is implemented for Value with mixed type coercion left as a TODO, awk's coercion rules are nuanced enough that some input would be appreciated before proceeding.

@Alonely0
Copy link
Copy Markdown
Collaborator

Alonely0 commented May 26, 2026

I'm so sorry, but I was working on this as well on my local branch ;w;. I'm gonna go ahead and close this since I got all the comparisons done per spec (you got some TODOs). Ty for noticing the Concat mishap, tho.

@Alonely0 Alonely0 closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants