mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
The RE wasn't correct, since we want to isolate the directive.
Also check for pragma and emit a warning.
This commit is contained in:
parent
fb83279706
commit
633c31df6c
1 changed files with 3 additions and 3 deletions
|
@ -326,7 +326,7 @@ class parser(object):
|
|||
r'^#\s*(?:'
|
||||
r'(?:[Ll][Ii][Nn][Ee]\s+)?(\d+)(?:\s+("(?:[^"\\]|\\.)*"))?'
|
||||
r'|'
|
||||
r'([A-Za-z0-9_]+\s+(.+?))'
|
||||
r'([A-Za-z0-9_]+)\s+(.+?)'
|
||||
r')\s*$'
|
||||
)
|
||||
match = self.parse_directive_re.search(directive)
|
||||
|
@ -350,9 +350,9 @@ class parser(object):
|
|||
del linenum
|
||||
else:
|
||||
assert match.group(3) is not None
|
||||
if match.group(3) == 'pragma':
|
||||
if match.group(3).lower() == 'pragma':
|
||||
# TODO: process #pragma
|
||||
pass
|
||||
warning('pragma not implemented')
|
||||
|
||||
def GetToken(self):
|
||||
"""Lexer"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue