Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Commit 488fdc9

Browse files
authored
Merge branch 'main' into fix/structs
2 parents 8fc3345 + 4973559 commit 488fdc9

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
name: Node.js CI
1+
name: Tests
22

33
on: push
44

5-
permissions: write-all
5+
permissions: read-all
6+
7+
env:
8+
SOL_AST_COMPILER_CACHE: ${{ github.workspace }}/.compiler_cache
69

710
jobs:
811
build:
@@ -20,9 +23,17 @@ jobs:
2023
with:
2124
node-version: ${{ matrix.node-version }}
2225

23-
- run: yarn install
26+
- name: Install Solc AST binary
27+
run: yarn global add solc-typed-ast
28+
29+
- name: Install dependencies
30+
run: yarn install
2431

25-
- run: yarn test
26-
env:
27-
SOL_AST_COMPILER_CACHE: /home/runner/work/_temp/.compiler_cache
32+
- name: Pre-download compilers from historical builds archive
33+
run: |
34+
sol-ast-compile --download-compilers native wasm
35+
find $SOL_AST_COMPILER_CACHE -name 'list.json' -delete
36+
find $SOL_AST_COMPILER_CACHE -name '*v0.5.17*' -delete
2837
38+
- name: Run tests
39+
run: yarn test

sample-data/BasicSample.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ contract BasicSample {
1919
/**
2020
* @notice External function that returns a bool
2121
* @dev A dev comment
22-
* @param _magicNumber A parameter description
22+
* @param _magicNumber A parameter description
2323
* @param _name Another parameter description
2424
* @return _isMagic Some return data
2525
*/
@@ -50,7 +50,7 @@ contract BasicSample {
5050
* @notice External function that returns a bool
5151
* @dev A dev comment
5252
* @param _magicNumber A parameter description
53-
* @param _name Another parameter description
53+
* @param _name Another parameter description
5454
* @return _isMagic Some return data
5555
* @return Test test
5656
*/

src/parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ export function parseNodeNatspec(node: SolcContractNode): Natspec {
2727
result.inheritdoc = { content: tagMatch[2] };
2828
}
2929
} else if (tagName === 'param' || tagName === 'return') {
30-
const tagMatch = line.match(/^\s*@(\w+) (\w+) (.*)$/);
30+
const tagMatch = line.match(/^\s*@(\w+) *(\w+) (.*)$/);
3131
if (tagMatch) {
3232
currentTag = { name: tagMatch[2], content: tagMatch[3].trim() };
3333
result[tagName === 'param' ? 'params' : 'returns'].push(currentTag);
3434
}
3535
} else {
36-
const tagMatch = line.match(/^\s*@(\w+) (.*)$/);
36+
const tagMatch = line.match(/^\s*@(\w+) *(.*)$/);
3737
if (tagMatch) {
3838
currentTag = { name: tagName, content: tagMatch[2] };
3939
result.tags.push(currentTag);

0 commit comments

Comments
 (0)