Add role documentation, add system begin & end tokens (#793)

This commit is contained in:
ObjectNotFound
2024-07-29 14:02:49 +08:00
committed by GitHub
parent 325a06c2de
commit 8f6274c82b
4 changed files with 33 additions and 3 deletions

View File

@@ -705,9 +705,9 @@ class ProgramState:
def _role_common(self, name: str, expr: Optional[SglExpr] = None):
if expr is not None:
self.stream_executor.submit(
SglExprList([SglRoleBegin(name), expr, SglRoleEnd(name)])
)
role_expr = SglExprList([SglRoleBegin(name), expr, SglRoleEnd(name)])
self.stream_executor.submit(role_expr)
return role_expr
else:
@contextmanager