google / google/xls

Support use before define within a file

Open
#197 0 comments 0 reactions 0 assignees View on GitHub
dslx long-term-enhancement
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Please allow this:

```
#![test]
fn test_order() {
let _ = assert_eq(identity(u32:0), u32: 0);
()
}

fn identity(x : u32) -> u32 {
x
}
```

Toy examples aside, there are good organizational reasons to allow the developer to order symbols (e.g. functions) within the file in whatever order is best for readability. Succinctly, let's choose 'readable for humans' over 'easy for parser'.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.