Skip to content

Commit

Permalink
Patch enum regex
Browse files Browse the repository at this point in the history
This change fixes the regex for enum matching
  • Loading branch information
JoinedSenses authored Jun 8, 2020
1 parent 4a1104f commit de81c38
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions SPCompletions.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ def read_string(buffer, found_comment, brace_level):
process_thread = ProcessQueueThread()
file_event_handler = IncludeFileEventHandler()
include_dirs = Wrapper()
includes_re = re.compile(r'^[\s]*#include[\s]+[<"]([^>"]+)[>"]', re.MULTILINE)
includes_re = re.compile(r'^[ \t*]*#include[\s]+[<"]([^>"]+)[>"]', re.MULTILINE)
local_re = re.compile(r'\.(sp|inc)$')
enum_re = re.compile(r'enum\b[ \t]*(struct[ \t]*)?([\w_]+)?')
function_re = re.compile(r'^(?:(native|stock|forward)[ \t]*)?(?:([\w_]+)(?:[ \t]+|:))?([\w_]+[ \t]*\()')
fullfunction_re = re.compile(r'^(?:(native|stock|forward) )?(?:([\w_]+)(?: +|:))?([\w_]+ *\(.*?\))')
define_re = re.compile(r'#define[\s]+([^\s]+)[\s]+(.+)')
enum_re = re.compile(r'^[ \t]*enum\b[ \t]*(struct[ \t]*)?([\w_]+)?')
function_re = re.compile(r'^[ \t]*(?:(native|stock|forward)[ \t]*)?(?:([\w_]+)(?:[ \t]+|:))?([\w_]+[ \t]*\()')
fullfunction_re = re.compile(r'^[ \t]*(?:(native|stock|forward) )?(?:([\w_]+)(?: +|:))?([\w_]+ *\(.*?\))')
define_re = re.compile(r'#define[ \t]+([^\s]+)[\s]+(.+)')

0 comments on commit de81c38

Please sign in to comment.