Skip to content

Commit

Permalink
Update JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaro committed Jun 19, 2020
1 parent ddc0efa commit 0b5ddbc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions schema/decls.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@
},
{
"$ref": "members.json#/definitions/alias"
},
{
"$ref": "#/definitions/alias"
},
{
"$ref": "#/definitions/constant"
},
{
"$ref": "#/definitions/class"
},
{
"$ref": "#/definitions/module"
},
{
"$ref": "#/definitions/interface"
}
]
},
Expand Down
3 changes: 3 additions & 0 deletions schema/members.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
},
"location": {
"$ref": "location.json"
},
"overload": {
"type": "boolean"
}
},
"required": ["member", "kind", "types", "comment", "annotations", "location"]
Expand Down
13 changes: 13 additions & 0 deletions test/rbs/schema_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,17 @@ def foo: () -> Integer

assert_decl decl, :interface
end

def test_nested
decl, = RBS::Parser.parse_signature(<<EOF)
module RBS
VERSION: String
class Namespace
end
end
EOF

assert_decl decl, :module
end
end

0 comments on commit 0b5ddbc

Please # to comment.