Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parser tests #623

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Conversation

gmartina
Copy link
Contributor

@gmartina gmartina commented Jun 18, 2024

Parser tests ported from deprecated test_impr folder.

Test Check input multiple reg array 1 fails:
packages/colibri/tests/parser/parser_verilog_entity.spec.ts

Port j is not properly parsed:
input reg [7:0] i, j,

I believe the bug could potentially be in here:
packages/colibri/src/parser/ts_verilog/utils.ts

export function search_multiple_in_tree(element: any, matching_title: string) {
    const arr_match: any[] = [];
    function recursive_searchTree(element: any, matching_title: string): any {
        const type = element.type;
        if (type === matching_title) {
            arr_match.push(element);
        } else if (element !== undefined) {
            let result = undefined;
            for (let i = 0; result === undefined && i < element.childCount; i++) {
                result = recursive_searchTree(element.child(i), matching_title);
            }
            return result;
        }
        return undefined;
    }
    recursive_searchTree(element, matching_title);
    return arr_match;
}

@qarlosalberto Could you advise me on this?

@qarlosalberto
Copy link
Contributor

I remember that fail. For now we can skip that test. Not sure if it's possible to fix it with our tree-sitter version.

@gmartina gmartina marked this pull request as ready for review June 18, 2024 13:12
@gmartina
Copy link
Contributor Author

gmartina commented Jun 18, 2024

I remember that fail. For now we can skip that test. Not sure if it's possible to fix it with our tree-sitter version.

Skipped. PR ready for review.

@qarlosalberto
Copy link
Contributor

Thanks for that!

@qarlosalberto qarlosalberto added this pull request to the merge queue Jun 18, 2024
Merged via the queue into TerosTechnology:dev with commit 1ad865a Jun 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants