feat: add builtin types/functions to diagnostics and completions
Files Modified/Created: - src/builtin_instructions.lua - NEW: Contains all TIA Portal built-in types, FBs, and functions - src/diagnostics.lua - Added missing data types + builtin instruction checking - src/main.lua - Added completion support for built-in types/F Bs/functions - src/plc_json.lua - Added .db file parsing + BOM handling fixes - lua/scl/blink_cmp_source.lua - Extended completion with all built-in types/F Bs/functions - src/node-types.json - Added node types for parser - AGENTS.md - Updated documentation Features Added: 1. Diagnostics - No more false "Unknown data type" warnings for: - All elementary types (USINT, SINT, UINT, UDINT, LINT, ULINT, TOD, DTL, etc.) - Timer/counter types (IEC_TON, TOF, TP, CTU, CTD, CTUD) - TIA Portal built-in FBs and functions 2. Auto-completion - Shows in VAR section after :: - 28 elementary data types - 23 built-in function blocks (TON, TOF, TP, CTU, CTD, CTUD, R_TRIG, F_TRIG, etc.) - 80+ built-in functions (ADD, SUB, MUL, DIV, SIN, COS, SQRT, etc.)
This commit is contained in:
+9
-1
@@ -1524,10 +1524,18 @@
|
||||
"type": "tod",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "TOD",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "uint",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "UInt",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "usint",
|
||||
"named": false
|
||||
@@ -1552,4 +1560,4 @@
|
||||
"type": "}",
|
||||
"named": false
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user