WebIDL tool
Project description
pywebidl2
Description
This is a tool for the Web IDL language.
Quick start
pip install pywebidl2
Tests
make test
Antlr
Install
Update parser
antlr4 -o generated -no-listener -visitor -Dlanguage=Python3 WebIDLParser.g4 WebIDLLexer.g4
Example
Parser
interface B {
void g([AllowAny] DOMString s);
};
[
{
"type": "interface",
"name": "B",
"inheritance": null,
"members": [
{
"type": "operation",
"name": "g",
"idl_type": {
"type": "return-type",
"ext_attrs": [],
"generic": "",
"nullable": false,
"union": false,
"idl_type": "void"
},
"arguments": [
{
"type": "argument",
"name": "s",
"ext_attrs": [
{
"type": "extended-attribute",
"name": "AllowAny",
"rhs": null,
"arguments": []
}
],
"idl_type": {
"type": "argument-type",
"ext_attrs": [],
"generic": "",
"nullable": false,
"union": false,
"idl_type": "DOMString"
},
"default": null,
"optional": false,
"variadic": false
}
],
"ext_attrs": [],
"special": ""
}
],
"ext_attrs": [],
"partial": false
}
]
Documentation
See original parser
Contributing
Any help is welcome and appreciated.
License
pywebidl2 is licensed under the terms of the MIT License (see the file LICENSE).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pywebidl2-0.1.4.tar.gz
(123.9 kB
view hashes)
Built Distribution
pywebidl2-0.1.4-py3-none-any.whl
(66.2 kB
view hashes)
Close
Hashes for pywebidl2-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e7bdae609996e0fd4e0ba925f33c4370e3dd2ab9a623b69a0fd6802de433094 |
|
MD5 | 25fae8f8d0177b96006abdd766bfd41c |
|
BLAKE2b-256 | 09030725bbc48fd8f6d7ba9c9b35b4b5fc46e35e238f0a8a13b855d572f6cccd |