Skip to content

Commit

Permalink
fixed keywords generator script
Browse files Browse the repository at this point in the history
  • Loading branch information
forntoh committed Aug 25, 2021
1 parent 2cc63ff commit 4280701
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .scripts/keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def build(files):

if len(stripped_line) > 9 and not stripped_line.startswith(tuple(prefixes)) and not stripped_line.endswith(tuple(sufixes)):
if re.search(r"^.+\s[a-z][A-Za-z]+\(.*", stripped_line) != None:
methodName = re.findall(r"\w+", stripped_line)[1]
words = re.findall(r"\w+", stripped_line)
methodName = words[1]
if words[0] == 'const':
methodName = words[2]
keyword_2_data += methodName + " KEYWORD2\n"
if len(stripped_line) > 7 and stripped_line.startswith('class '):
if re.search(r"\w+", stripped_line) != None:
Expand Down
2 changes: 1 addition & 1 deletion keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ displayNotification KEYWORD2
updateTimer KEYWORD2
getItemAt KEYWORD2
toggleBacklight KEYWORD2
char KEYWORD2
getText KEYWORD2
getCallback KEYWORD2
getSubMenu KEYWORD2
getType KEYWORD2
Expand Down

0 comments on commit 4280701

Please sign in to comment.