You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #367 now when you compile a bash script that include a stdlib there are comments from that stdlib.
An example:
import * from "std/math"
// Output
// 1
// 1
main {
echo abs(1);
echo abs(-1);
}
#!/usr/bin/env bash
# Written in [Amber](https://amber-lang.com/)
# version: 0.3.4-alpha
# date: 2024-08-08 14:52:58
# Returns the number rounded to the nearest integer
# Returns the largest integer less than or equal to the number
# Returns the smallest integer greater than or equal to the number
# Returns the absolute value of the number
function abs__4_v0 {
local number=$1
if [ $(echo ${number} '<' 0 | bc -l | sed '/\./ s/\.\{0,1\}0\{1,\}$//') != 0 ]; then
__AF_abs4_v0=$(echo '-' ${number} | bc -l | sed '/\./ s/\.\{0,1\}0\{1,\}$//')
return 0
fi
__AF_abs4_v0=${number}
return 0
}
abs__4_v0 1
__AF_abs4_v0__8_10="$__AF_abs4_v0"
echo "$__AF_abs4_v0__8_10"
abs__4_v0 $(echo '-' 1 | bc -l | sed '/\./ s/\.\{0,1\}0\{1,\}$//')
__AF_abs4_v0__9_10="$__AF_abs4_v0"
echo "$__AF_abs4_v0__9_10"
As we can see now includes all the documentation for the math stdlib also for the stuff unused.
I think that if we are talking about stdlib there should be no comments and also that if you import something the comments shouldn't be there for stuff that you are not using.
The text was updated successfully, but these errors were encountered:
No I checked the issues was happening also before that PR.
Probably the PR that added the documentation generator had that issue too. @Ph0enixKM this is for you
I think so, but also there is the issue that printed the whole comments in the file not just the one involved in the function so there is a bug somewhere.
After
#367now when you compile a bash script that include a stdlib there are comments from that stdlib.An example:
As we can see now includes all the documentation for the
math
stdlib also for the stuff unused.I think that if we are talking about stdlib there should be no comments and also that if you import something the comments shouldn't be there for stuff that you are not using.
The text was updated successfully, but these errors were encountered: