Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
b540030c0This file is pinned to the selected release. Download the original to open it in your design tool.
#!/bin/sh
awk '
/^module/{
m=1
split($2,narr,"(")
module=narr[1]"()"
}
/^function/{
m=0
module=""
}
/[^=] *assert\(/{
if(m) {
if(fname!=FILENAME) {
fname=FILENAME
print "File",fname
}
if(prevmodule!=module) {
prevmodule=module
print " Module",module
}
assertline=$0
sub(/^ */, "", assertline)
print " ",FNR,":",assertline
}
}
' *.scad