lsp: Adds support for include paths and have {projectUri}/node_modules added by default.

- Factor out FileRepository's path resolving into own public function.
- Fixes sourceUnitNameToUri() path resolving in relation to include paths being used.
- Adding an solAssert().
- adds nother test for include-paths (bad include)
- Fixes a case on Windows there an ill-formed URI was generated.
- Dropping unnecessary if-branch when translating from sourceUnitName to URI.
This commit is contained in:
Christian Parpart
2022-07-12 15:25:33 +02:00
parent d003400cb0
commit 31227e442e
10 changed files with 165 additions and 56 deletions
+10
View File
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.0;
library MyModule
{
function add(uint a, uint b) public pure returns (uint)
{
return a + b;
}
}