rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
160 stars 46 forks source link

Fixes transpile issue with global functions #1314

Closed markwpearce closed 6 days ago

markwpearce commented 6 days ago

Fixes issue where use of global functions in a namespace would cause tranpilier to prefix the functions fixes #1307

Given:

                  namespace is
                        function node(thing) as boolean
                            return invalid <> getInterface(thing, "ifSgNodeChildren")
                        end function
                    end namespace

before would transpile to:

                        function is_node(thing) as boolean
                            return invalid <> is_getInterface(thing, "ifSgNodeChildren")
                        end function

now transpiles to:

                        function is_node(thing) as boolean
                            return invalid <> getInterface(thing, "ifSgNodeChildren")
                        end function