• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

forst-lang / forst / 24037090201
76%

Build:
DEFAULT BRANCH: main
Ran 06 Apr 2026 03:05PM UTC
Jobs 1
Files 180
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Apr 2026 03:03PM UTC coverage: 61.597% (+0.3%) from 61.295%
24037090201

push

github

web-flow
feat(compiler): variable slice indexing and indexed assignment (#57)

docs: Add optionals RFC

test(printer): add round-trip format tests and fix AST printing

The parser stores several statement and type-def nodes as pointers; the
pretty-printer only matched value types, so real files skipped large parts
of printStmt and printTopLevel. Handle *IfNode, *ForNode, *TypeGuardNode,
and *TypeDefAssertionExpr, and omit the internal TYPE_SHAPE sentinel when
emitting structural shapes so output re-parses. Add FormatSource round-trip
cases, FormatDocument / UTF16Len tests, and printType assertion coverage.

Reorganize ROADMAP Language & types by theme (core typing, optionals/
Result, guards, generics, control flow, builtins) and expand planned/
experimental rows with RFC links and a switch vs match design note.

feat(compiler): variable slice indexing and indexed assignment

Add IndexExpressionNode, parse `expr[i]` chains and `xs[i] = v` as assignment
(not comparison). Extend AssignmentNode LValues to []ExpressionNode; typecheck
slice element reads (Int index) and `=` into index expressions; emit Go
index expressions and assignments.

Example:
```forst
func pick(xs []String, i Int): String {
      return xs[i]
}
func write(xs []String, i Int) {
      xs[i] = "x"
}
```

fix(transformer): correct Go types for slices and named returns

Use transformType for shape fields and function parameters so []T becomes a
real Go slice type, not a hash alias. When returning a user-defined struct
type, transform call expressions (e.g. `return inner()`) after the ident→
composite pass. Treat TypeArray, TypeMap, and TypeObject as builtins when
normalizing function return types so `return out` for `[]String` is not fed
through struct wrapping.

Example:
```forst
type R = { ok: Bool }
func inner(): R { return { ok: true } }
funouter(): R { return inner() }
```

feat(examples): add tic-tac-toe multi-file sample

Add engine, types, server, and ftconfig under examples/in/tictactoe u... (continued)

530 of 924 new or added lines in 33 files covered. (57.36%)

14 existing lines in 8 files now uncovered.

15371 of 24954 relevant lines covered (61.6%)

15.57 hits per line

Uncovered Changes

Lines Coverage ∆ File
111
58.1
-9.18% forst/cmd/forst/lsp/hover_completion.go
44
53.8
8.34% forst/internal/parser/expression.go
42
53.85
forst/internal/typechecker/builtin_doc.go
33
54.17
forst/internal/typechecker/field_hover.go
26
42.44
4.8% forst/internal/transformer/go/statement.go
18
64.59
-1.49% forst/internal/printer/printer.go
15
57.3
-1.17% forst/internal/hasher/hasher.go
15
85.22
-12.63% forst/internal/typechecker/infer_assignment.go
14
83.48
-10.11% forst/internal/parser/literal.go
12
64.02
7.92% forst/internal/typechecker/infer_expression.go
11
19.2
-0.12% forst/cmd/forst/lsp/navigation_locals.go
11
62.96
-4.78% forst/internal/typechecker/infer_function.go
7
83.56
-10.28% forst/internal/parser/assignment.go
6
80.65
-19.35% forst/internal/ast/expression.go
6
81.82
forst/internal/transformer/ts/forst_file_project.go
4
84.38
-15.63% forst/internal/ast/assignment.go
4
60.84
0.73% forst/internal/transformer/go/expression.go
4
85.71
forst/internal/typechecker/collect_order.go
2
76.29
-4.96% forst/internal/parser/statement.go
2
75.41
7.23% forst/internal/typechecker/go_hover.go
2
58.21
0.14% forst/internal/typechecker/unify_operators.go
1
81.78
-0.94% forst/cmd/forst/generate.go
1
84.13
0.0% forst/internal/parser/var.go
1
65.55
0.0% forst/internal/transformer/go/function.go
1
34.08
-0.34% forst/internal/transformer/go/shape.go
1
95.61
-0.11% forst/internal/transformer/ts/client.go

Coverage Regressions

Lines Coverage ∆ File
3
53.8
8.34% forst/internal/parser/expression.go
3
76.29
-4.96% forst/internal/parser/statement.go
2
62.96
-4.78% forst/internal/typechecker/infer_function.go
2
79.59
-2.04% forst/internal/typechecker/validate_references.go
1
81.78
-0.94% forst/cmd/forst/generate.go
1
19.2
-0.12% forst/cmd/forst/lsp/navigation_locals.go
1
84.38
-15.63% forst/internal/ast/assignment.go
1
83.56
-10.28% forst/internal/parser/assignment.go
Subprojects
ID Flag name Job ID Ran Files Coverage
1 /jobs/179829168 24037090201.1 06 Apr 2026 03:05PM UTC 180
61.6
GitHub Action Run
Source Files on build 24037090201
  • Tree
  • List 180
  • Changed 33
  • Source Changed 0
  • Coverage Changed 33
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 803caf0c on github
  • Prev Build on main (#24034168510)
  • Next Build on main (#24037113375)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc