From c5a41e2eb0551d7bfb19addad132d16b4e0c86f7 Mon Sep 17 00:00:00 2001
From: Frederik Hennig <frederik.hennig@fau.de>
Date: Fri, 15 Dec 2023 21:20:51 +0100
Subject: [PATCH] fixed generator script docs

---
 docs/usage/generator_scripts.md | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/docs/usage/generator_scripts.md b/docs/usage/generator_scripts.md
index 66b2652..49c6f06 100644
--- a/docs/usage/generator_scripts.md
+++ b/docs/usage/generator_scripts.md
@@ -67,7 +67,8 @@ With [`SfgComposer.include`][pystencilssfg.SfgComposer.include], the code genera
 to include header files. 
 
 ```Python
-with SourceFileGenerator(sfg_config) as sfg:
+with SourceFileGenerator(sfg_config) as ctx:
+    sfg = SfgComposer(ctx)
     # ...
     sfg.include("<vector>")
     sfg.incldue("custom_header.h")
@@ -93,7 +94,8 @@ If required, use [`SfgComposer.kernel_namespace`][pystencilssfg.SfgComposer.kern
 to access other kernel namespaces than the default one.
 
 ```Python
-with SourceFileGenerator(sfg_config) as sfg:
+with SourceFileGenerator(sfg_config) as ctx:
+    sfg = SfgComposer(ctx)
     # ...
 
     ast = ps.create_kernel(assignments, config)
@@ -127,7 +129,8 @@ Use [`SfgComposer.function`][pystencilssfg.SfgComposer.function] to create a fun
 and [`SfgComposer.call`][pystencilssfg.SfgComposer.call] to call a kernel by its handle:
 
 ```Python
-with SourceFileGenerator(sfg_config) as sfg:
+with SourceFileGenerator(sfg_config) as ctx:
+    sfg = SfgComposer(ctx)
     # ...
 
     sfg.function("MyFunction")(
@@ -167,7 +170,8 @@ A conditonal branch may be added with [`SfgComposer.branch`][pystencilssfg.SfgCo
 using a special syntax:
 
 ```Python
-with SourceFileGenerator(sfg_config) as sfg:
+with SourceFileGenerator(sfg_config) as ctx:
+    sfg = SfgComposer(ctx)
     # ...
     
     sfg.function("myFunction")(
-- 
GitLab