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

Relax whitespace sensitivity in Filecheck #54

@angusholder

Description

@angusholder

Filecheck is currently very stringent in matching whitespace of tests exactly, which leads to undesirable situations of having to add a regex match to pickup excess spaces between identifiers.

For example return v0,v1 isn't valid and must be return v0, v1 which is subtle and goes against intuition.

Another situation is that the code that stringifies IR can insert many spaces in unexpected places, such that when round-tripped through the a parse and restringify, the following:

[-,-] v2 = iadd v0, v1

becomes

[-]                     v2 = iadd v0, v1

meaning that a test to match it must look like the following:

; regex: WS=[ \t]*
; nextln: [-]$WS $v2 = iadd $v0, $v1

We should examine where (if anywhere) whitespace sensitivity is suitable, and remove it every else so that writing these common test cases has less friction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyIssues suitable for newcomers to investigate, including Rust newcomers!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions