(package_specification): now hidden in trees

Instead, package_declaration replaces it.  This provides
 better folding in nvim: otherwise, the final ';' was not
 part of the tree node, and thus the last line "end P;" was
 not folded.
This commit is contained in:
Emmanuel Briot 2023-02-13 13:51:44 +01:00
parent e9e2ec9d3b
commit 42cc2eb141
20 changed files with 31382 additions and 30813 deletions

View File

@ -330,17 +330,17 @@ module.exports = grammar({
$.subprogram_declaration,
$.expression_function_declaration,
$.null_procedure_declaration,
$._package_declaration,
$.package_declaration,
$._renaming_declaration,
$.exception_declaration,
$._generic_declaration,
$.generic_instantiation,
),
_package_declaration: $ => seq(
$.package_specification,
package_declaration: $ => seq(
$._package_specification,
';',
),
package_specification: $ => seq(
_package_specification: $ => seq(
reservedWord('package'),
field('name', $._name),
optional($.aspect_specification),
@ -1453,8 +1453,7 @@ module.exports = grammar({
),
generic_package_declaration: $ => seq(
$.generic_formal_part,
$.package_specification,
';',
$.package_declaration,
),
generic_instantiation: $ => seq( // ARM 12.3
choice(

588
package-lock.json generated
View File

@ -1,8 +1,578 @@
{
"name": "tree-sitter-ada",
"version": "0.1.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "tree-sitter-ada",
"version": "0.1.0",
"dependencies": {
"tree-sitter": "0.20.0",
"tree-sitter-cli": "0.20.7"
}
},
"node_modules/ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/aproba": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
},
"node_modules/are-we-there-yet": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
"integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==",
"dependencies": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"dependencies": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
}
},
"node_modules/bl/node_modules/readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/chownr": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
},
"node_modules/code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
},
"node_modules/core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"node_modules/decompress-response": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
"integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
"dependencies": {
"mimic-response": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
},
"node_modules/detect-libc": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
"bin": {
"detect-libc": "bin/detect-libc.js"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dependencies": {
"once": "^1.4.0"
}
},
"node_modules/expand-template": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
"engines": {
"node": ">=6"
}
},
"node_modules/fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
"node_modules/gauge": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
"integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==",
"dependencies": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.0",
"object-assign": "^4.1.0",
"signal-exit": "^3.0.0",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wide-align": "^1.1.0"
}
},
"node_modules/github-from-package": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
},
"node_modules/has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ=="
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/ini": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
"node_modules/is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==",
"dependencies": {
"number-is-nan": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
},
"node_modules/mimic-response": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/minimist": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/mkdirp-classic": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
},
"node_modules/nan": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ=="
},
"node_modules/napi-build-utils": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
},
"node_modules/node-abi": {
"version": "2.30.1",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz",
"integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==",
"dependencies": {
"semver": "^5.4.1"
}
},
"node_modules/npmlog": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"dependencies": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
"gauge": "~2.7.3",
"set-blocking": "~2.0.0"
}
},
"node_modules/number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/prebuild-install": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz",
"integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==",
"dependencies": {
"detect-libc": "^1.0.3",
"expand-template": "^2.0.3",
"github-from-package": "0.0.0",
"minimist": "^1.2.3",
"mkdirp-classic": "^0.5.3",
"napi-build-utils": "^1.0.1",
"node-abi": "^2.21.0",
"npmlog": "^4.0.1",
"pump": "^3.0.0",
"rc": "^1.2.7",
"simple-get": "^3.0.3",
"tar-fs": "^2.0.0",
"tunnel-agent": "^0.6.0"
},
"bin": {
"prebuild-install": "bin.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"node_modules/pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"node_modules/rc": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"dependencies": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
},
"bin": {
"rc": "cli.js"
}
},
"node_modules/readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
},
"node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"node_modules/simple-concat": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/simple-get": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",
"integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",
"dependencies": {
"decompress-response": "^4.2.0",
"once": "^1.3.1",
"simple-concat": "^1.0.0"
}
},
"node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==",
"dependencies": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
"dependencies": {
"ansi-regex": "^2.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/tar-fs": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
"dependencies": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
"pump": "^3.0.0",
"tar-stream": "^2.1.4"
}
},
"node_modules/tar-stream": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"dependencies": {
"bl": "^4.0.3",
"end-of-stream": "^1.4.1",
"fs-constants": "^1.0.0",
"inherits": "^2.0.3",
"readable-stream": "^3.1.1"
},
"engines": {
"node": ">=6"
}
},
"node_modules/tar-stream/node_modules/readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/tree-sitter": {
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.0.tgz",
"integrity": "sha512-tqTdtD1T2cN4aEES0sZCjKTQrc9Ls8H/iYlzpskhGy8yCwNPKBIbK9YuuCg/AxACr8RAY4wMoeCigM1X/A79yg==",
"hasInstallScript": true,
"dependencies": {
"nan": "^2.14.0",
"prebuild-install": "^6.0.1"
}
},
"node_modules/tree-sitter-cli": {
"version": "0.20.7",
"resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.20.7.tgz",
"integrity": "sha512-MHABT8oCPr4D0fatsPo6ATQ9H4h9vHpPRjlxkxJs80tpfAEKGn6A1zU3eqfCKBcgmfZDe9CiL3rKOGMzYHwA3w==",
"hasInstallScript": true,
"bin": {
"tree-sitter": "cli.js"
}
},
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
"dependencies": {
"safe-buffer": "^5.0.1"
},
"engines": {
"node": "*"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"node_modules/wide-align": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
"integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
"dependencies": {
"string-width": "^1.0.2 || 2 || 3 || 4"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
@ -329,6 +899,14 @@
"simple-concat": "^1.0.0"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
@ -339,14 +917,6 @@
"strip-ansi": "^3.0.0"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",

View File

@ -10,7 +10,8 @@
"generate": "tree-sitter generate",
"test": "tree-sitter generate && time tree-sitter test",
"testquick": "time tree-sitter test",
"update-test": "tree-sitter test --update"
"update-test": "tree-sitter test --update",
"install": "cp queries/*scm ~/.local/share/nvim/site/pack/packer/start/nvim-treesitter/queries/ada; echo 'RUN :TSInstall ada' in nvim"
},
"main": "bindings/node",
"tree-sitter": [

View File

@ -2,7 +2,8 @@
;; za toggles folding a package, subprogram, if statement or loop
[
(package_specification)
(package_declaration)
(generic_package_declaration)
(package_body)
(subprogram_body)
(block_statement)

View File

@ -79,7 +79,7 @@
"parallel"
"reverse"
"some"
] @keyword.repeat
] @repeat
[
"return"
] @keyword.return
@ -100,15 +100,15 @@
(string_literal) @string
(string_literal) @spell ;; spell-check strings
(character_literal) @string
(identifier) @variable
(numeric_literal) @number
;; Highlight the name of subprograms
(procedure_specification name: (_) @function)
(function_specification name: (_) @function)
(package_specification name: (_) @function)
(package_declaration name: (_) @function)
(package_body name: (_) @function)
(generic_instantiation name: (_) @function)
(entry_declaration . (identifier) @function)
;; Some keywords should take different categories depending on the context
(use_clause "use" @include "type" @include)
@ -148,6 +148,10 @@
(range_constraint "range" @keyword.type)
(signed_integer_type_definition "range" @keyword.type)
(index_subtype_definition "range" @keyword.type)
(record_type_definition "abstract" @keyword.type)
(record_type_definition "tagged" @keyword.type)
(record_type_definition "limited" @keyword.type)
(record_type_definition (record_definition "null" @keyword.type))
(private_type_declaration "is" @keyword.type "private" @keyword.type)
(private_type_declaration "tagged" @keyword.type)
(private_type_declaration "limited" @keyword.type)

View File

@ -3,7 +3,7 @@
;; See https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables
(compilation) @scope
(package_specification) @scope
(package_declaration) @scope
(package_body) @scope
(subprogram_declaration) @scope
(subprogram_body) @scope
@ -12,7 +12,7 @@
(with_clause (identifier) @definition.import)
(procedure_specification name: (_) @definition.function)
(function_specification name: (_) @definition.function)
(package_specification name: (_) @definition.var)
(package_declaration name: (_) @definition.var)
(package_body name: (_) @definition.var)
(generic_instantiation . name: (_) @definition.var)
(component_declaration . (identifier) @definition.var)

View File

@ -12,7 +12,8 @@
(subprogram_body (handled_sequence_of_statements) @function.inner)
(function_specification) @function.outer
(procedure_specification) @function.outer
(package_specification) @function.outer
(package_declaration) @function.outer
(generic_package_declaration) @function.outer
(package_body) @function.outer
(if_statement) @block.outer
(if_statement statements: (_) @block.inner)

View File

@ -1157,7 +1157,7 @@
},
{
"type": "SYMBOL",
"name": "_package_declaration"
"name": "package_declaration"
},
{
"type": "SYMBOL",
@ -1177,12 +1177,12 @@
}
]
},
"_package_declaration": {
"package_declaration": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "package_specification"
"name": "_package_specification"
},
{
"type": "STRING",
@ -1190,7 +1190,7 @@
}
]
},
"package_specification": {
"_package_specification": {
"type": "SEQ",
"members": [
{
@ -8574,11 +8574,7 @@
},
{
"type": "SYMBOL",
"name": "package_specification"
},
{
"type": "STRING",
"value": ";"
"name": "package_declaration"
}
]
},

View File

@ -1567,11 +1567,11 @@
"named": true
},
{
"type": "package_renaming_declaration",
"type": "package_declaration",
"named": true
},
{
"type": "package_specification",
"type": "package_renaming_declaration",
"named": true
},
{
@ -5695,7 +5695,7 @@
"named": true
},
{
"type": "package_specification",
"type": "package_declaration",
"named": true
}
]
@ -6184,11 +6184,11 @@
"named": true
},
{
"type": "package_renaming_declaration",
"type": "package_declaration",
"named": true
},
{
"type": "package_specification",
"type": "package_renaming_declaration",
"named": true
},
{
@ -7729,11 +7729,11 @@
"named": true
},
{
"type": "package_renaming_declaration",
"type": "package_declaration",
"named": true
},
{
"type": "package_specification",
"type": "package_renaming_declaration",
"named": true
},
{
@ -8331,139 +8331,7 @@
}
},
{
"type": "package_renaming_declaration",
"named": true,
"fields": {
"name": {
"multiple": true,
"required": true,
"types": [
{
"type": "attribute_designator",
"named": true
},
{
"type": "character_literal",
"named": true
},
{
"type": "function_call",
"named": true
},
{
"type": "gnatprep_identifier",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "qualified_expression",
"named": true
},
{
"type": "reduction_attribute_designator",
"named": true
},
{
"type": "selected_component",
"named": true
},
{
"type": "slice",
"named": true
},
{
"type": "string_literal",
"named": true
},
{
"type": "target_name",
"named": true
},
{
"type": "tick",
"named": true
},
{
"type": "value_sequence",
"named": true
}
]
},
"package_name": {
"multiple": true,
"required": true,
"types": [
{
"type": "attribute_designator",
"named": true
},
{
"type": "character_literal",
"named": true
},
{
"type": "function_call",
"named": true
},
{
"type": "gnatprep_identifier",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "qualified_expression",
"named": true
},
{
"type": "reduction_attribute_designator",
"named": true
},
{
"type": "selected_component",
"named": true
},
{
"type": "slice",
"named": true
},
{
"type": "string_literal",
"named": true
},
{
"type": "target_name",
"named": true
},
{
"type": "tick",
"named": true
},
{
"type": "value_sequence",
"named": true
}
]
}
},
"children": {
"multiple": false,
"required": false,
"types": [
{
"type": "aspect_specification",
"named": true
}
]
}
},
{
"type": "package_specification",
"type": "package_declaration",
"named": true,
"fields": {
"endname": {
@ -8656,11 +8524,11 @@
"named": true
},
{
"type": "package_renaming_declaration",
"type": "package_declaration",
"named": true
},
{
"type": "package_specification",
"type": "package_renaming_declaration",
"named": true
},
{
@ -8698,6 +8566,138 @@
]
}
},
{
"type": "package_renaming_declaration",
"named": true,
"fields": {
"name": {
"multiple": true,
"required": true,
"types": [
{
"type": "attribute_designator",
"named": true
},
{
"type": "character_literal",
"named": true
},
{
"type": "function_call",
"named": true
},
{
"type": "gnatprep_identifier",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "qualified_expression",
"named": true
},
{
"type": "reduction_attribute_designator",
"named": true
},
{
"type": "selected_component",
"named": true
},
{
"type": "slice",
"named": true
},
{
"type": "string_literal",
"named": true
},
{
"type": "target_name",
"named": true
},
{
"type": "tick",
"named": true
},
{
"type": "value_sequence",
"named": true
}
]
},
"package_name": {
"multiple": true,
"required": true,
"types": [
{
"type": "attribute_designator",
"named": true
},
{
"type": "character_literal",
"named": true
},
{
"type": "function_call",
"named": true
},
{
"type": "gnatprep_identifier",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "qualified_expression",
"named": true
},
{
"type": "reduction_attribute_designator",
"named": true
},
{
"type": "selected_component",
"named": true
},
{
"type": "slice",
"named": true
},
{
"type": "string_literal",
"named": true
},
{
"type": "target_name",
"named": true
},
{
"type": "tick",
"named": true
},
{
"type": "value_sequence",
"named": true
}
]
}
},
"children": {
"multiple": false,
"required": false,
"types": [
{
"type": "aspect_specification",
"named": true
}
]
}
},
{
"type": "parameter_association",
"named": true,

61207
src/parser.c

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)

View File

@ -12,7 +12,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -84,7 +84,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -125,7 +125,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -166,7 +166,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)

View File

@ -57,7 +57,7 @@ end;
(result_profile
(identifier)))
(subprogram_default))))
(package_specification
(package_declaration
(identifier)
(pragma_g
(identifier)

View File

@ -46,7 +46,7 @@ enD;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier))))
================================================================================
@ -66,14 +66,14 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(package_specification
(package_declaration
(identifier)
(identifier))
(identifier)))
(compilation_unit
(package_specification
(package_declaration
(selected_component
(identifier)
(identifier))
@ -142,7 +142,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(private_type_declaration
(identifier))
@ -175,7 +175,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(incomplete_type_declaration
(identifier))

View File

@ -14,7 +14,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -75,7 +75,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(task_type_declaration

View File

@ -44,7 +44,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(object_declaration
(identifier)

View File

@ -10,7 +10,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -37,7 +37,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -91,7 +91,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -118,7 +118,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -153,7 +153,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -190,7 +190,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -241,7 +241,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)

View File

@ -12,7 +12,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(null_procedure_declaration
(procedure_specification
@ -42,7 +42,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(subprogram_declaration
(procedure_specification
@ -73,7 +73,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(subprogram_declaration
(procedure_specification
@ -100,7 +100,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(subprogram_declaration
(function_specification

View File

@ -247,7 +247,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(task_type_declaration
@ -273,7 +273,7 @@ end;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(task_type_declaration

View File

@ -10,7 +10,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -34,7 +34,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -61,7 +61,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -85,7 +85,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -132,7 +132,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(full_type_declaration
(identifier)
@ -172,7 +172,7 @@ end P;
(compilation
(compilation_unit
(package_specification
(package_declaration
(identifier)
(subtype_declaration
(identifier)