# \[Bug\] Functions and classes appear in the list even if inside a comment

**URL:** <https://forum.inductiveautomation.com/t/bug-functions-and-classes-appear-in-the-list-even-if-inside-a-comment/85306>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [February 6, 2024, 4:09pm UTC](https://forum.inductiveautomation.com/t/bug-functions-and-classes-appear-in-the-list-even-if-inside-a-comment/85306 "2024-02-06T16:09:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alvaro\_Rodriguez](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Alvaro\_Rodriguez](https://forum.inductiveautomation.com/u/Alvaro_Rodriguez)\
**Post date:** [February 6, 2024, 4:09pm UTC](https://forum.inductiveautomation.com/t/bug-functions-and-classes-appear-in-the-list-even-if-inside-a-comment/85306/1 "2024-02-06T16:09:47Z")

</div>

I am not really sure if this is a bug, but I wouldn't expect this behaviour.  
I noticed functions and classes defined inside a comment appear in the list to the right of the scripting window.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/8/9879c61c2aca87bba689c097fe541b64e8a6f40d.png)

I have seen this issue in Ignition 8.1.18 and in Ingition Edge 8.1.32

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [February 6, 2024, 4:13pm UTC](https://forum.inductiveautomation.com/t/bug-functions-and-classes-appear-in-the-list-even-if-inside-a-comment/85306/2 "2024-02-06T16:13:09Z")

</div>

I would guess that the parsing is a bit naïve in respect to what is a Doc String, what is a comment, and what is actual syntax.

@paul-griffith would be able to say for certain.

Definitely agree that its not "expected" behavior.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 6, 2024, 5:07pm UTC](https://forum.inductiveautomation.com/t/bug-functions-and-classes-appear-in-the-list-even-if-inside-a-comment/85306/3 "2024-02-06T17:07:34Z")

</div>

The current parsing that populates that sidebar is just some fairly naive regex based parsing that's very easy to break. It's long been on my list to replace it with a proper AST based parse, like what populates the actual autocomplete, but it hasn't risen to the top of the pile.  
I'm hoping to tackle it as part of a suite of scripting related improvements in 8.3.0.
