chore: initial commit Dutra Store POS app
This commit is contained in:
23
check_strings.py
Normal file
23
check_strings.py
Normal file
@@ -0,0 +1,23 @@
|
||||
with open('D:\\app\\ai\\app-grosir\\test_syntax2.dart', 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
for i, line in enumerate(lines):
|
||||
stripped = line.strip()
|
||||
if stripped.startswith('//') or stripped.startswith('/*') or stripped.startswith('*'):
|
||||
continue
|
||||
in_string = False
|
||||
escape = False
|
||||
for j, c in enumerate(line):
|
||||
if escape:
|
||||
escape = False
|
||||
continue
|
||||
if c == '\\':
|
||||
escape = True
|
||||
continue
|
||||
if c in "'\"":
|
||||
if not in_string:
|
||||
in_string = True
|
||||
else:
|
||||
in_string = False
|
||||
if in_string:
|
||||
print(f'Unclosed string at line {i+1}: {line.rstrip()}')
|
||||
Reference in New Issue
Block a user