feat(vast): C 解析器补齐 T | None 与语句级声明
支持 T | None、typedef/define/static/export/extern/inline 变量形态;C 解析失败不再回退纯 Python,直接 fail-fast;同步重建 _parser.pyd。
This commit is contained in:
1 parent
109e71a477
commit
c8e49a60ed
3 files changed
+286
-8
No files matched your search
@@ -183,13 +183,7 @@ def parse(source: str, filename: str = '<unknown>', mode: str = 'exec', *,
|
||||
try:
|
||||
return _VAST_C_PARSE(source, mode)
|
||||
except SyntaxError as _exc:
|
||||
if _os.environ.get('VAST_USE_C') == 'strict':
|
||||
raise _HumanizeSyntaxError(_exc, source, filename) from None
|
||||
_ReportCFallback(filename, _exc)
|
||||
except Exception as _exc:
|
||||
if _os.environ.get('VAST_USE_C') == 'strict':
|
||||
raise
|
||||
_ReportCFallback(filename, _exc)
|
||||
raise _HumanizeSyntaxError(_exc, source, filename) from None
|
||||
try:
|
||||
return _ParsePure(source, mode)
|
||||
except SyntaxError as _exc:
|
||||
|
||||
Reference in new issue
Block a user