fix(basic): use centralized keyword list for lowercase conversion
All checks were successful
BotServer CI/CD / build (push) Successful in 4m54s
All checks were successful
BotServer CI/CD / build (push) Successful in 4m54s
This commit is contained in:
parent
b496900165
commit
eb0aba0a9a
1 changed files with 4 additions and 8 deletions
|
|
@ -1260,15 +1260,11 @@ impl ScriptService {
|
|||
}
|
||||
|
||||
/// Convert BASIC keywords to lowercase without touching variables
|
||||
/// This is a simplified version of normalize_variables_to_lowercase for tools
|
||||
/// Uses the centralized keyword list from get_all_keywords()
|
||||
pub fn convert_keywords_to_lowercase(script: &str) -> String {
|
||||
let keywords = [
|
||||
"IF", "THEN", "ELSE", "END IF", "FOR", "NEXT", "WHILE", "WEND",
|
||||
"DO", "LOOP", "RETURN", "EXIT",
|
||||
"WITH", "END WITH", "AND", "OR", "NOT", "MOD",
|
||||
"DIM", "AS", "NEW", "FUNCTION", "SUB", "CALL",
|
||||
"DETECT",
|
||||
];
|
||||
use crate::basic::keywords::get_all_keywords;
|
||||
|
||||
let keywords = get_all_keywords();
|
||||
|
||||
let mut result = String::new();
|
||||
for line in script.lines() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue