fix: limit auto-semicolon to control structure END_* keywords only
- Only auto-add semicolon for END_IF, END_FOR, END_WHILE, END_REPEAT, END_CASE - Exclude block definitions (END_FUNCTION, END_FUNCTION_BLOCK, END_VAR, etc.)
This commit is contained in:
@@ -38,11 +38,9 @@ local keywords = {
|
|||||||
"CONSTANT", "RETAIN", "NON_RETAIN",
|
"CONSTANT", "RETAIN", "NON_RETAIN",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Keywords that need semicolon after them (when at end of statement)
|
-- Keywords that need semicolon after them (control structure ends only)
|
||||||
local end_keywords = {
|
local end_keywords = {
|
||||||
"END_IF", "END_FOR", "END_WHILE", "END_REPEAT", "END_CASE",
|
"END_IF", "END_FOR", "END_WHILE", "END_REPEAT", "END_CASE",
|
||||||
"END_VAR", "END_FUNCTION", "END_FUNCTION_BLOCK", "END_ORGANIZATION_BLOCK",
|
|
||||||
"END_TYPE", "END_STRUCT", "END_DATA_BLOCK", "END_REGION",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Map lowercase to uppercase for auto-conversion
|
-- Map lowercase to uppercase for auto-conversion
|
||||||
|
|||||||
Reference in New Issue
Block a user