feat: add testing framework with reference project integration
- Add test/ directory with test harness and test files - Add UDT, DB, FB parser tests - Add PLC JSON and integration tests - Test against reference project (239 UDTs, 12 DBs, 37 SCL, 13 XML) - Fix attribute parsing to handle underscores (S7_SetPoint) - Add ORGANIZATION_BLOCK support to FB parser
This commit is contained in:
@@ -104,10 +104,10 @@ local function parse_attributes(attr_str)
|
||||
end
|
||||
|
||||
local attrs = {}
|
||||
for key, value in attr_str:gmatch("(%w+)%s*:=%s*'([^']+)'") do
|
||||
for key, value in attr_str:gmatch("([%w_]+)%s*:=%s*'([^']+)'") do
|
||||
attrs[key] = value
|
||||
end
|
||||
for key, value in attr_str:gmatch("(%w+)%s*:=%s*(%w+)") do
|
||||
for key, value in attr_str:gmatch("([%w_]+)%s*:=%s*(%w+)") do
|
||||
attrs[key] = value
|
||||
end
|
||||
return attrs
|
||||
|
||||
Reference in New Issue
Block a user