Skip to content
Snippets Groups Projects
Commit 175cde9b authored by pycsham's avatar pycsham
Browse files

Made changes to the scanner to catch more errors for compound IDs

parent ecd5a07a
No related branches found
No related tags found
No related merge requests found
......@@ -488,8 +488,11 @@ def scan(input):
# Checking wrong keywords in compIDs
elif token.name == 'COMPID':
temp = token.lex.split('.')
if temp[0] in wrongJavaKeyWordDict:
return (None, "wrong keyword in comp id")
for i, t in enumerate(temp):
if i == 0 and t in wrongJavaKeyWordDict:
return (None, "wrong keyword in comp id")
if i is not 0 and (t == 'Class' or t == 'class'):
return (None, "wrong keyword in comp id")
# Checking if the multi line comment has a closing tag
if token.name == 'LCOMMENT':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment