feat: DB管线补全 + 新增orchestrator_db/program_schema/to_sql + 清理临时脚本
This commit is contained in:
@@ -90,8 +90,15 @@ def _convert_node(node: BranchNode, parent: BrSeq):
|
||||
if c.kind == "WHEN":
|
||||
cond = (c.branch_names or [""])[0]
|
||||
cond = cond[5:-1] if cond.startswith("WHEN(") and cond.endswith(")") else cond
|
||||
# Strip trailing body text (everything after first COBOL verb)
|
||||
cond = cond.split()[0] if cond.split() else cond
|
||||
# Strip trailing body text at first COBOL verb
|
||||
for verb in ('DISPLAY', 'MOVE', 'ADD', 'SUBTRACT', 'MULTIPLY', 'DIVIDE', 'COMPUTE',
|
||||
'STRING', 'UNSTRING', 'SET', 'INSPECT', 'INITIALIZE', 'CONTINUE',
|
||||
'PERFORM', 'CALL', 'EXIT', 'GOBACK', 'STOP',
|
||||
'READ', 'WRITE', 'DELETE', 'REWRITE', 'ACCEPT', 'OPEN', 'CLOSE'):
|
||||
idx = cond.upper().find(f' {verb} ')
|
||||
if idx >= 0:
|
||||
cond = cond[:idx].strip()
|
||||
break
|
||||
ws = BrSeq()
|
||||
for wc in c.children: _convert_node(wc, ws)
|
||||
if cond.upper() == "OTHER":
|
||||
|
||||
Reference in New Issue
Block a user