Skip to content

File doc.json is missing desc/rawdesc keys for variables #2520

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
AndreasMatthias opened this issue Feb 13, 2024 · 0 comments
Closed

File doc.json is missing desc/rawdesc keys for variables #2520

AndreasMatthias opened this issue Feb 13, 2024 · 0 comments

Comments

@AndreasMatthias
Copy link
Contributor

The following files, x1.lua and x2.lua, both define a global variable ipsum and a global function lorem.

File x1.lua:

---Func lorem() in x1.lua
function lorem()
end

---Var ipsum in x1.lua
ipsum = 123

File x2.lua:

---Func lorem() in x2.lua
function lorem()
end

---Var ipsum in x2.lua
ipsum = 123

The section of the global variable ipsum in doc.json is the following:

    {
        "defines": [
            {
                "extends": {
                    "finish": 50011,
                    "start": 50008,
                    "type": "integer",
                    "view": "integer"
                },
                "file": "file:///home/andreas/Projects/Code/examples/x1.lua",
                "finish": 50005,
                "start": 50000,
                "type": "setglobal"
            },
            {
                "extends": {
                    "finish": 50011,
                    "start": 50008,
                    "type": "integer",
                    "view": "integer"
                },
                "file": "file:///home/andreas/Projects/Code/examples/x2.lua",
                "finish": 50005,
                "start": 50000,
                "type": "setglobal"
            }
        ],
        "desc": "Var ipsum in x2.lua",
        "name": "ipsum",
        "rawdesc": "Var ipsum in x2.lua",
        "type": "variable"
    },

The following keys containing the variable descriptions are missing:

defines[1].extends.desc
defines[1].extends.rawdesc
defines[2].extends.desc
deinfes[2].extends.rawdesc

Note, that these keys are available for global function definitions:

    {
        "defines": [
            {
                "extends": {
                    "args": [],
                    "desc": "Func lorem() in x1.lua",
                    "finish": 20003,
                    "rawdesc": "Func lorem() in x1.lua",
                    "start": 10000,
                    "type": "function",
                    "view": "function lorem()"
                },
                "file": "file:///home/andreas/Projects/Code/examples/x1.lua",
                "finish": 10014,
                "start": 10009,
                "type": "setglobal"
            },
            {
                "extends": {
                    "args": [],
                    "desc": "Func lorem() in x2.lua",
                    "finish": 20003,
                    "rawdesc": "Func lorem() in x2.lua",
                    "start": 10000,
                    "type": "function",
                    "view": "function lorem()"
                },
                "file": "file:///home/andreas/Projects/Code/examples/x2.lua",
                "finish": 10014,
                "start": 10009,
                "type": "setglobal"
            }
        ],
        "desc": "Func lorem() in x2.lua",
        "name": "lorem",
        "rawdesc": "Func lorem() in x2.lua",
        "type": "variable"
    }

Could you add these keys, please?

Another question: What's the difference between desc and rawdesc?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant