From 7bcd54920e9dda582ae1db03368e1c21fb1cd19e Mon Sep 17 00:00:00 2001 From: Alexander Kuechler Date: Tue, 5 Nov 2024 18:29:50 +0100 Subject: [PATCH] Document LookupScopeStatement EOG --- .../aisec/cpg/passes/EvaluationOrderGraphPass.kt | 5 ++++- docs/docs/CPG/specs/eog.md | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/EvaluationOrderGraphPass.kt b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/EvaluationOrderGraphPass.kt index 247894d56c..aa9326f2b0 100644 --- a/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/EvaluationOrderGraphPass.kt +++ b/cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/EvaluationOrderGraphPass.kt @@ -1216,7 +1216,10 @@ open class EvaluationOrderGraphPass(ctx: TranslationContext) : TranslationUnitPa handleContainedBreaksAndContinues(node) } - // TODO: Documentation missing + /** + * See + * [Specification](https://fraunhofer-aisec.github.io/cpg/CPG/specs/eog/#lookupScopestatement) + */ private fun handleLookupScopeStatement(stmt: LookupScopeStatement) { // Include the node as part of the EOG itself, but we do not need to go into any children or // properties here diff --git a/docs/docs/CPG/specs/eog.md b/docs/docs/CPG/specs/eog.md index a4c85071f4..d3f31ebd28 100644 --- a/docs/docs/CPG/specs/eog.md +++ b/docs/docs/CPG/specs/eog.md @@ -894,8 +894,15 @@ flowchart LR parent --EOG--> next:::outer ``` +## LookupScopeStatement +The expression itself is connected to the outer EOG. +Interesting fields: / - - - +Scheme: +```mermaid +flowchart LR + classDef outer fill:#fff,stroke:#ddd,stroke-dasharray:5 5; + prev:::outer --EOG--> parent["LookupScopeStatement"] + parent --EOG--> next:::outer +```