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

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

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

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.

@PGriffith would be able to say for certain.

Definitely agree that its not "expected" behavior.

1 Like

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.

3 Likes