mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-08-25 02:20:33 +00:00
Add RegUse_ support to the lua metaprogram. Ideated further on type mapping atom comonents to their base component op (math distinctions annotated in the asm).
This commit is contained in:
+9
-2
@@ -2248,8 +2248,15 @@ local function _project_emission_inner(root_body_entry, ctx_table)
|
||||
end
|
||||
|
||||
local function apply_sub(sub_map, operand)
|
||||
if sub_map and type(operand) == "string" and sub_map[operand] then
|
||||
return sub_map[operand]
|
||||
if not (sub_map and type(operand) == "string") then return operand end
|
||||
if sub_map[operand] then return sub_map[operand] end
|
||||
local dot = operand:find(".", 1, true)
|
||||
if dot then
|
||||
local head = operand:sub(1, dot - 1)
|
||||
local mapped = sub_map[head]
|
||||
if type(mapped) == "string" then
|
||||
return mapped .. operand:sub(dot)
|
||||
end
|
||||
end
|
||||
return operand
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user