Skip to content

Commit

Permalink
0.0.8 (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
serkonda7 authored Dec 25, 2024
1 parent 2aec836 commit c9edb54
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes are documented in this file.
> Bait is currently in an Alpha State (`0.0.x`). Breaking changes may occur at any time.

## 0.0.8 - unreleased
## 0.0.8 - 2024-12-25
### Breaking
- Syntax: Replace field modifier groups of structs and interfaces with per-field modifiers ([GH-233](https://github.com/bait-lang/bait/pull/233))
- Syntax: Replace toplevel `global` with `static` ([GH-249](https://github.com/bait-lang/bait/issues/249))
Expand Down
5 changes: 1 addition & 4 deletions cli/tools/init/init.bt
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,14 @@ fun main() {
init.use_template(template)
}

fun (init Init) check_preconditions() !bool {
fun (init Init) check_preconditions() ! {
if init.name == '.' {
if os.ls('.').length > 0 {
return error('cannot run init in non-empty directory')
}
} else if os.exists(init.name) {
return error('"${init.name}" already exists')
}

// FIXME function should return !void
return true
}

fun (init Init) create_git_repo() {
Expand Down
1 change: 0 additions & 1 deletion lib/bait/ast/table.bt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pub struct Table {
pub mut fun_decls map[string]FunDecl
pub mut type_idxs map[string]Type
pub mut type_symbols []TypeSymbol
pub mut redefined_types []string
pub mut needed_equality_funs []Type
pub mut needed_str_funs []Type
pub mut generic_fun_types map[string][][]Type // Array of concrete types used for each generic fun
Expand Down
2 changes: 2 additions & 0 deletions lib/bait/builder/builder.bt
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ pub fun compile(prefs preference.Prefs) i32 {
return 1
}

// TODO sema_ctx.free()

// Transformer
timers.start('TRANSFORM')
trans := transformer.Transformer{
Expand Down
2 changes: 1 addition & 1 deletion lib/bait/checker/fun.bt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fun (mut c Checker) fun_decl(mut node ast.FunDecl) {
fun (mut c Checker) fun_instance(mut node ast.FunDecl) {
c.returns = false
c.cur_fun = node
c.check_fun_attrs(mut node) // FIXME this should error because node is not mut
c.check_fun_attrs(mut node)

// save current generic names in outer scope and override them with
// the funs' generic names (so does_type_exist can detect nonexistent generic names)
Expand Down
2 changes: 1 addition & 1 deletion lib/bait/parser/stmt.bt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ fun (mut p Parser) const_decl() !ast.ConstDecl{
kind = .constant
pkg = ffi_pkg
typ = typ
is_pub = true // TODO rethink ffi pub behaviour (pub by default + warn on pub keyword OR require pub keyword)
is_pub = true // TODO FFI rethink ffi pub behaviour (pub by default + warn on pub keyword OR require pub keyword)
})

return ast.ConstDecl{
Expand Down
2 changes: 1 addition & 1 deletion lib/bait/util/version.bt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
// SPDX-License-Identifier: MIT
package util

pub const VERSION := '0.0.7'
pub const VERSION := '0.0.8'
pub const FULL_VERSION := '${VERSION} ${$BAITHASH}'
1 change: 0 additions & 1 deletion lib/cli/cli.bt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub fun (mut cmd Command) parse(args []string) {
for i := 0; i < args.length; i += 1 {
arg := args[i]
if arg.starts_with('--') {
// FIXME this should require cmd.options to be mutable as well
for mut opt in cmd.options {
if arg.ends_with(opt.name) {
opt.found = true
Expand Down

0 comments on commit c9edb54

Please sign in to comment.