Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fixes #20132; fixes the broken jsondoc comand [backport] #20135

Merged
merged 2 commits into from
Aug 4, 2022
Merged

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Aug 1, 2022

fixes #20132

todo

  • tests

@ringabout
Copy link
Member Author

proc doSomething*(x, y: int): int =
  ## seed
  x + y

const
  a* = 1 ## echo 1234
  b* = "test"

type
  MyEnum* = enum
    foo, bar

outputs

{
  "orig": "C:\\Users\\blue\\Desktop\\Nim\\testexe.nim",
  "nimble": "compiler",
  "moduleDescription": "",
  "entries": [
    {
      "name": "doSomething",
      "type": "skProc",
      "line": 1,
      "col": 0,
      "code": "proc doSomething(x, y: int): int {.raises: [], tags: [], forbids: [].}",
      "signature": {
        "return": "int",
        "arguments": [
          {
            "name": "x",
            "type": "int"
          },
          {
            "name": "y",
            "type": "int"
          }
        ],
        "pragmas": [
          "raises: []",
          "tags: []",
          "forbids: []"
        ]
      },
      "description": "seed"
    },
    {
      "name": "a",
      "type": "skConst",
      "line": 6,
      "col": 2,
      "code": "a = 1",
      "description": "echo 1234"
    },
    {
      "name": "b",
      "type": "skConst",
      "line": 7,
      "col": 2,
      "code": "b = \"test\""
    },
    {
      "name": "MyEnum",
      "type": "skType",
      "line": 10,
      "col": 10,
      "code": "MyEnum = enum\n  foo, bar"
    }
  ]
}

@ringabout ringabout changed the title fixes #20132; fixes the broken jsondoc comand fixes #20132; fixes the broken jsondoc comand [backport] Aug 2, 2022
@ringabout ringabout requested a review from Araq August 3, 2022 14:14
@Araq Araq merged commit 2aeb0d5 into devel Aug 4, 2022
@Araq Araq deleted the pr_jsondoc branch August 4, 2022 06:49
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 2aeb0d5

Hint: mm: orc; threads: on; opt: speed; options: -d:release
163582 lines; 11.157s; 841.172MiB peakmem

narimiran pushed a commit that referenced this pull request Aug 23, 2022
* fixes #20132; fixes the broken jsondoc comand

* add testcase

(cherry picked from commit 2aeb0d5)
capocasa pushed a commit to capocasa/Nim that referenced this pull request Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nim jsondoc output is broken
2 participants