Skip to content

lang/llvmir/parser: Fix typo in parse_arithmetic() (was "arithmatic"). #124

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion ppci/lang/llvmir/codegenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def gen_instruction(self, instruction):
ir_ins = self.emit(ir.Alloc(name, amount))
self.val_map[instruction] = ir_ins
elif isinstance(instruction, nodes.GetElementPtrInst):
# Implement arithmatic here!
# Implement arithmetic here!
ir_ins = self.get_val(instruction.ptr)
print(instruction.indices)
# raise NotImplementedError(str(instruction))
Expand Down
6 changes: 3 additions & 3 deletions ppci/lang/llvmir/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ def parse_instruction(self):
"lshr",
"ashr",
]:
instruction = self.parse_arithmatic()
instruction = self.parse_arithmetic()
elif self.peek in ["and", "or"]:
instruction = self.parse_arithmatic()
instruction = self.parse_arithmetic()
elif self.peek in [
"sext",
"zext",
Expand All @@ -553,7 +553,7 @@ def parse_instruction(self):
self.not_impl()
return instruction

def parse_arithmatic(self):
def parse_arithmetic(self):
op = self.consume().val
lhs = self.parse_type_and_value()
self.consume(",")
Expand Down